Android Mobile APP - device data refreshing problem on server 5.2

this problem was fixed in version 5.3

Niko Lync2 years ago

Not for all mobile devices. I noticed an interesting thing - if I switch the application to the background with the "circle" button or by slide from the bottom up, the problem occurs after put the application to foreground. However, if I switch the application to the background with the "triangle" button or by slide from left to right , after put the application again to foreground everything is OK.

In both cases of "exit", the application goes to the background, but only after exiting with the triangle button or after dragging from left to right after turning it on again, you can clearly see that it takes a little longer and the data is refreshed.

This is what happens on the Oppo Reno 2 phone

Actually it was not solved in the new version 5.3, when the application has a time in the background, it seems that the session expires and does not update until you close the session or force the application to close and go back to initial session.

I think if the "remember" button was the same as in versions prior to 5.0, the session would remain active and this would not happen, but we must validate this with @Anton Tananaev

javier2602 years ago

Hello, I have the same issue using docker traccar server v.5.3 and android traccar manager app. The issue is with modern web interface. It works well with legacy web interface. I need more testing to check exactly when it starts failing, but the effect is that I see an old position of devices in live map, but I can see the right current position if I go through replay button and I advance to finall position. If I logout and login from traccar manager app, then all is working well another time until I block the mobile. The mobile is a Samsung Galaxy A32.
Apart of trying to solve the issue, I have a question. Is there any way to use legacy with traccar manager app, and modern with a browser?

Anton Tananaev2 years ago

Check mobile browser to see if the same issue happens there.

As for using the legacy app alongside modern, it is possible. For example you can have two different domain names and set up a proxy and for one of the virtual hosts you include web files.

javier2602 years ago

Hi,
Yes, with mobile browser (Chrome) I have the same issue as in traccar manager app. Any hint about any parameter in the mobile to avoid it?
Thanks

Anton Tananaev2 years ago

If it happens in mobile browser as well, you should be able to check developer tools to see what happens.

jesus leguizamon2 years ago

Hi,

Webhook connection stoped, and no reconnect

Anton Tananaev2 years ago

What is a Webhook connection? Screenshots please.

jesus leguizamon2 years ago
Anton Tananaev2 years ago

Your screenshot shows that the WebSocket is still active. You should probably provide proper explanation for what you're claiming.

jesus leguizamon2 years ago

Hi, I have debugged the webview with Chrome, in the images you can see that the status is 101 but the connection has already ended, "time" has a value, it normally says Pending. Also in another picture I took when connecting the phone to debug after bringing the app to the foreground, it shows that the socket is not present

https://drive.google.com/file/d/1e5tGcToEG3vWlER9kZZSGPgTwUjkPjTY/view?usp=drivesdk

https://drive.google.com/file/d/1CvVJNbYCrgwOmDLqNypG5x5Kie-_0m_M/view?usp=drivesdk

https://drive.google.com/file/d/1d2TYjWpZsGtxEQ24yK0O_7kZRCKy3YBf/view?usp=drivesdk

Anton Tananaev2 years ago

Empty network tab probably means that you connected dev tools too late.

jesus leguizamon2 years ago

Hi

I solved this

Add method close socket in SocketController.js

    socket.onclose = (e) => {
      if (e.wasClean) {
        console.log('Socket is closed.');
      } else {
        console.log('Socket is closed. Reconnect will be attempted in 10 second.', e.reason);
        setTimeout(() => connectSocket(), 10000);
      }
    };
Anton Tananaev2 years ago