Notifications not sending push notifications until I create a new notification - Traccar 5.5

Dankniel2 years ago

Hi,

I noticed something weird with the notifications, I'm using a custom mobile app that updates the user notificationTokens when you log in. The push notification using the test channel works but current notifications on devices don't.

Then if I create a new notification on the web app (or using the API through postman) I start receiving push notifications correctly on my app. I'm not sure what is happening its like the traccar server don't update current notifications with new firebase tokens until X hours OR until I create a new notification.

Anton Tananaev2 years ago

Have you tested the official app?

Dankniel2 years ago

Hi Anton,

Yes I'm testing on the traccar manager app and I'm having the same behavior.

if the notificationTokens attribute is updated I should be able to receive push notifications immediately?

Anton Tananaev2 years ago

I think so. Does it work if you restart the server?

Dankniel2 years ago

Well, now I'm receiving this error testing the manager app

SenderId mismatch - FirebaseMessagingException (... < NotificatorFirebase:94 < NotificationResource:96 < ...)

Also restarting the server seems to work as well, I started receiving notifications on the custom app. Not sure what is happening, should I downgrade the traccar server version?

Anton Tananaev2 years ago
Dankniel2 years ago

I tested this on my localhost and remote server and now push notifications are working perfectly!

Thank you so much Anton.

Juankaher2 years ago

Hello,
Im facing the same issue. Do you know if this fix is already in the last official version?

Anton Tananaev2 years ago

There's no issue with the server. The issue is with your setup. So that's not something we can fix. You need to fix it.

Juankaher2 years ago

Sorry Anton. Could you please give me some clues..Where is the error....I installed the lastest version and updated the firebase account account service and is showing that message.

SenderId mismatch - FirebaseMessagingException (... < NotificatorFirebase:94 < NotificationResource:96 < ...)

Im lost

Anton Tananaev2 years ago

Have you reset the device token for your user?

Juankaher2 years ago

yes. several times
and even restarted the server

Anton Tananaev2 years ago

Well, the error is coming directly from Firebase. There has to be some mismatch somewhere. Maybe you have to update your custom mobile app? Make sure it points to the same Firebase project.

Juankaher2 years ago

ok. thanks Anton for your valuable assessment.