Device position not updating on map and More Details but ok in Reports and Replay

Victor Butler2 years ago

Hi,

I am facing very strange issue after upgrading to v5.3 with modern interface. Devices are teltonika, although I doubt it's a problem with them.

Here is the issue: The device position is not correct on the Map. When I go to "More Details", I get this:
Server Time 2022-09-11 16:06:31
Device Time 2022-09-11 16:05:40
Fix Time 2022-09-11 16:05:40

When I go to Route Report, the last record is this one:
Server Time 2022-09-11 16:25:40
Device Time 2022-09-11 16:25:35
Fix Time 2022-09-11 16:25:35

In Replay the last record for the device is this one: 2022-09-11 16:25:35 and the position on the Replay Map is correct.

So for some reason the Map and the Details page in the modern UI, do not reflect the devices last record.

More details:
The issue occurred today for two different devices, one of them got "fixed" by itself (I don't know how) and it's position on the map is correct at the moment. But the other one is still wrong. The server continue to successfully receive positions from other devices.
Tried to log in from a phone browser as well a desktop browser (Chrome and Edge) - the issue persists in all of them.

The logs don't show any errors. I can provide screenshots if needed.

Anton Tananaev2 years ago

Are you sure there are no errors or warnings in the log? If not, there's probably some WebSocket issue.

Victor Butler2 years ago

The only errors from today are those ones:

INFO: [U7d5d1971] error - NullPointerException (NotificatorFirebase:55 < <gener:-1 < *:-1 < ... < NotificatorManager:73 < ...)
WARN: Geocoder network error - HTTP 429 Too Many Requests - ClientErrorException (... < JsonGeocoder:126 < NotificationManager:97 < *:124 < BaseEventHandler:40 < ...)

First one is related to the new config requirement for Firebase push notifications and the second one to the Geocoder requests.
Both fixed now.

None seem to be related to this issue but still...

Anton Tananaev2 years ago

The first one is very relevant. That's the reason for the problem. Why did you say no errors in the log?

Victor Butler2 years ago

Because it didn't really seem relevant to the problem.

Still, the Traccar version was updated last night. If the wrong Firebase config is the root cause, why was the map position being updated up to 4PM today and then suddenly stopped?
Shouldn't it have stopped being updated right after the upgrade and not at a random time on the following day?

Anton Tananaev2 years ago

Have you checked WebSocket connection?

Victor Butler2 years ago

Yes, WebSocket seems to be fine - here.

Obviously I am missing something but I cannot find out what it is yet.

Anton Tananaev2 years ago

Check the messages.

Victor Butler2 years ago

I did check the messages before and after the "glitch" happened but there is nothing out of the ordinary.

Any other idea how to debug? The device in question still showing in the wrong position.

Anton Tananaev2 years ago

What do you mean nothing out of the ordinary? Do you see the device updates and positions?

Victor Butler2 years ago

Yes, I see the server has received all data packages, in the correct time order, no records were missing and no records were sent to the server at a later time (i.e. device hasn't lost GPRS connection).

However, I noticed some randomness in the server logs, which could probably explain what happened:

Normal server functionality:

2022-09-12 21:03:08  INFO: [xxxxx: teltonika < 52.28.119.173] HEX here
2022-09-12 21:03:08  INFO: [xxxxx: teltonika > 52.28.119.173] Server response here
2022-09-12 21:03:08  INFO: [xxxxx] id: xxxxxxxxx, time: 2022-09-12 21:03:06, lat: xxx, lon: xxx, speed: xxx, course: xxx

Because of the issue (whatever the root cause), in the logs I always have the first two lines - the data packet and the server response. But the third line - the decoded device id, with time stamp and coordinates are missing in 88% of the cases. Device sent 344 data packets, only for 43 of those, the server produced the third line.

I believe the third line is the one used to update the device position on the map. Hence the explanation why we see all positions in the reports but not on the map.

So the question is, was really the firebase misconfiguration the reason why the server did not produce line 3 for all the records. And if yes, why did it produce the line for a random 12% of the cases and it didn't in the rest?

Yesterday's logs look fine, line 3 is always present. I will keep monitoring.

Anton Tananaev2 years ago

I was talking about the WebSocket.

javier2602 years ago

Hello. maybe I'm wrong, but it looks like the same issue as described here:
https://www.traccar.org/forums/topic/android-mobile-app-device-data-refreshing-problem-on-server-52/

Anton Tananaev2 years ago

That's what I'm trying to figure out, but Victor is insisting that the WebSocket is working fine.

Victor Butler2 years ago

Two devices showed this problem on Sunday. Both suddenly froze on the Map in the afternoon. Later in the evening one of them got it's position updated and the other didn't. A third device was in sleep mode, sending data every hour without a problem.
This is why I believe the WebSocket is fine. If it was the WebSocket, all devices should have been experiencing the issue (and not updating their position), isn't it?