master branch
I recommend testing official release to see if it's some kind of regression.
Ok I see Thanks Anton
Hi Anton, I’m still facing the same issue. Notifications don’t work when I log in with a new device. I checked the Firebase token, and everything seems fine, but the notification isn’t received. After restarting the server, it works.
Then I tested logging out and switching to other accounts. When I logged back into my account, the notification stopped working again. After restarting the server, it started working. Events are generated.
Can you guide me on adding some code to log what happens? If there’s an error, I can work on fixing it.Im using latest traccar v 6.6
No errors in the logs?
Hi Anton
This is what I have so far. As I said, once I restarted the server, the notifications started working again. But this time, I noticed something else: even after I log out and the Firebase token is deleted from the user attributes, the notifications keep arriving.
Here are the logs when a notification arrives, even though no token is saved for my account:
2025-02-02 23:22:17 INFO: Event id: 359633109424866, time: 2025-02-02 23:22:13, type: ignitionOn, notifications: 1
The notifications keep arriving whether I’m logged into my account or not. It seems like the Traccar server is caching the token, and I need to restart the server to update Traccar that this user no longer has a Firebase token.
After logging out and restarting the server, the notifications stop, which is fine.
However, when I log in again, no notifications arrive. It seems like Traccar remembers that there was no token, so I have to restart the server again to make it work. I have tested this multiple times.
I get this error after logging in and generating an ignition notification. But my tokens are neither empty nor null. It seems that Traccar remembers that there was no token, even though one exists, and I need to restart the server for Traccar to recognize the new token. After restarting, the notifications arrive successfully.
2025-02-02 23:29:35 WARN: Firebase error - none of the tokens can be null or empty - IllegalArgumentException (... < NotificatorFirebase:111 < Notificator:39 < NotificationManager:139 < ... < *:132 < ... < *:131 < *:176 < ProcessingHandler:185 < ...)
2025-02-02 23:32:43 INFO: Event id: 359633109424866, time: 2025-02-02 23:32:40, type: ignitionOff, notifications: 1
2025-02-02 23:32:43 WARN: Firebase error - none of the tokens can be null or empty - IllegalArgumentException (... < NotificatorFirebase:111 < Notificator:39 < NotificationManager:139 < ... < *:132 < ... < *:131 < *:176 < ProcessingHandler:185 < ...)
And you're using official Traccar without any code modifications?
Yes, as mentioned before, I was using Traccar from the master branch, but now I’m using the latest version (6.6). I built it from the source code and only changed some vehicle icons. I haven’t modified anything in the Traccar server.
Also, if you can help me identify which file might be causing this error, I can do some debugging.
(https://nyc3.digitaloceanspaces.com/traccar/images/20250202T231838.jpg)
Hi Anaton, I think I found the issue. I was updating the Firebase token in directly my database instead of using the Traccar API, which caused Traccar to use old cached data.
It's just shocking to me why people refuse to share such important details upfront. Don't you think it's important to mention? I would have told you immediately that it's exactly the problem.
That’s will be noted thank you
By latest version from GitHub you mean master branch? Or later official release cut?