traccar / traccar-manager-android

Traccar Manager for Android
https://www.traccar.org/manager
Apache License 2.0
262 stars 374 forks source link

Traccar manager with modern UI doesn't follow device #88

Closed renaudallard closed 2 years ago

renaudallard commented 2 years ago

Hello,

It seems that with the modern UI, the location shown in the app might not always reflect the actual location. If, for example, I set up a device to report every 10 seconds, I won't see it move every 10s, it generally stays at the position of when I first start the app. But, if I go to "replay the trip", it will show me the real last location (with all the rest of the trip).

I am using a reverse proxy (nginx) to get SSL, so it might be related, but it works with the old UI. This is the proxy config:

    location / {
          proxy_pass http://127.0.0.1:8082/;
           proxy_set_header Host $host;
           proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "upgrade";
           proxy_buffering     off;
           proxy_connect_timeout 43200000;
           proxy_send_timeout    43200000;
           proxy_read_timeout    43200000;
           proxy_redirect off;
           proxy_set_header Proxy "";
           proxy_cookie_path /api "/api; secure; HttpOnly";
   }

Thanks

tananaev commented 2 years ago

Have you checked the WebSocket connection in both apps?

renaudallard commented 2 years ago

I have slightly changed the proxy config for the websocket and it seems to work, but I am not sure this is 100% solved. I am closing this and will reopen if it occurs again.

in http field, I added:

   map $http_upgrade $connection_upgrade {
           default upgrade;
          '' close;
   }

and in the reverse proxy config:

           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection $connection_upgrade;