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

Dankniela year 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 Tananaeva year ago

Have you tested the official app?

Dankniela year 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 Tananaeva year ago

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

Dankniela year 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 Tananaeva year ago
Dankniela year ago

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

Thank you so much Anton.

Juankahera year ago

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

Anton Tananaeva year 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.

Juankahera year 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 Tananaeva year ago

Have you reset the device token for your user?

Juankahera year ago

yes. several times
and even restarted the server

Anton Tananaeva year 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.

Juankahera year ago

ok. thanks Anton for your valuable assessment.