Devices not shown on map despite online and data received (Traccar 5, modern UI)

Andreas2 years ago

Hi!

I just upgraded to the newest version 5 of Traccar and after finding out, how to update the database, I got it running.

Nevertheless, I have a problem with the modern UI.

Although a device is shown online and position updates are received (hey and decoded in the log as well as complete set in the database), the location is not shown on the map. When I switch to the old UI, all works perfect and an icon is shown at the current location.

There are no error messages in the log.

Also the INFO button and the replay button for that device are greyed out when clicking on the device in the device list.

Any hint where to look to fix the issue? Thanks.

anpalama2 years ago

In modern ui under device properties you should choose new symbol. In modern ui there is no arrow device symbol.

Anton Tananaev2 years ago

If the info button is greyed out, it means there's not location. Check if WebSocket connection is working.

Andreas2 years ago

Thanks... to better clearify:

  • When clicking on a device, the map (in modern UI) is not jumping to the device last position.
  • The map is always showing / jumping to location LA Downtown
  • I selected a different symbol but despite the device is shown online, nothing at all comes up at the device location.
  • How to check the Websocket connection?

As I said, the location reports from the Traccar Android Client app are properly received, logged as hex and decoded and stored in the database, the location is correct (lat, long, alt) and the old UI shows it correctly.

Andreas2 years ago

Also..

  • In modern UI, I cannot retrieve any historic route information.

Switching to classic UI, everything above works.

tulkas2 years ago

Same here. I dont know how to view past routes on the map . I only see the GPS points from the report view.
My traccar also shows the localtion from LA Downtown, and then moves to my location.

Anton Tananaev2 years ago

You can check websocket connection in browser developer tools.

As for historic route, there's a replay for that. Select device and click the replay button in the popup.

Andreas2 years ago

The replay button is greyed out and cannot be clicked in modern UI.

Anton Tananaev2 years ago

Probably the same reason. Have you checked the WebSocket?

Andreas2 years ago

@Anton

Thanks, it was the web socket. Looks like the old UI did not need it, so the Proxy Statements were commented out in the webserver. Now it works.

For those not that familiar with the browser dev tools (like me), look unter "Browser menu" - "more tools" - "developer tools" and there in the console.

Using ProxPass, a separate entry ws: for the web socket is required to make this work.

Carlo Glinetzki2 years ago

@Andreas,
I have the same problem, saw now in dev tools
"SocketController.js:27 WebSocket connection to 'wss://traccar.XXXXX.XXX/api/socket' failed" .
In my apache config I see:

        ProxyPass http://192.168.1.16:8082/
        ProxyPassReverse http://192.168.1.16:8082/

Can You tell me what separate entry ws I should make?
thanks in advance

Andreas2 years ago

@Carlo

You might need

ProxyPass /api/socket ws://192.168.1.16:8082/api/socket
ProxyPassReverse /api/socket ws://192.168.1.16:8082/api/socket

in the nginx configuration for Traccar

Carlo Glinetzki2 years ago

@Andreas
Thanks for the hint, but I have no nginx proxy but use Apache, but it should work the same way and there where definitely no entries for the socket. But actually I'm not able to make it work, I always get the same error, searched for hours on the web and tried different configs, but no chance.
For now I can use the old UI, or connect directly to the traccar server without proxy, but this works only inside my private network. Hopefully I can find a solution before the old UI is turned off completeley.

Anton Tananaev2 years ago

We have documentation for proper Apache proxy config:

https://www.traccar.org/secure-connection/

tulkas2 years ago

The "replay thing" was my fault. I did't get that the replay button is for that (it looks like a refresh buton to reload the info from the device).
thanks!