Just put a log in every class that extends BasePositionHandler
.
Now we are talking. Thanks. Will try and let you know what I find out.
So, we've got some progress.
While waiting to get the new logger data, I made a deeper analysis of the log files - I tried to find the first data record which causes the device freeze issue. To my surprise there was also an error record, which I initially missed because it was with INFO instead of WARN tag.
So for all freezing devices (that I analyzed), we get this error, after which no more data for this device is recorded in the positions table:
INFO: [U1f1dacbd] error - Index 1 out of bounds for length 1 - ArrayIndexOutOfBoundsException (NotificatorFirebase:118 < Notificator:39 < NotificationManager:140 < ... < *:133 < ... < *:132 < *:177 < ProcessingHandler:191 < ...)
Does this indicate an issue with firebase, the incoming HEX or with the protocol decoder?
This error seems to indicate that you're not using the official code. Here's the line in the official version:
It cannot generate this exception. There's also try-catch, which should handle it.
I have modified and non modified 6.4 servers and there are freezing devices on both. I have deeply analyzed only the logs on the modified version assuming it's the same root cause. Need to check the logs from the non modified one.
On a side note, I have also modified the short templates on both servers. The error might lie there, I need add additional loggers and verify.
Another thing I noticed is that before the error appears, the server logs an event entry like this:
2024-09-11 01:54:48 INFO: Event id: 12345678912345, time: 2024-09-11 01:54:48, type: alarm, notifications: 2
What does notifications: 2
mean? Similar alarm events that have notifications: 1
do not generate errors.
The number means a number of notifications for this event.
Number of notifications like sending the notification to two different notification tokens?
No, two notification instances.
I am not sure I follow, why would an event generate more than one notification instance?
You can configure any number of notifications for an event type.
Right, so for example if two users configure notification for ignitionOn
on the same device, then there will be two notification instances for that event. Got it. Thanks for clarifying!
Please try with this change:
https://github.com/traccar/traccar/commit/815f4f1a35dc82c30e909a24a21b631795c7ecc2
Ok will amend the code and test it. I had a brief look only but what this change does is basically a try/catch aiming to log any exceptions as warn messages, right?
Any updates on this?
Any specific handlers to recommend? For me right now is like shooting in the dark.