Push Notification API key changed. Updated traccar.xml, but Push Notification still not working.

mojiwunefela 18 hours ago

OK, I looked at the traccar-manager source history and now I understand what happened.

  • Up to 6.1.2 the app sent a long FCM token (getToken()).
  • From 6.2.0 it registers a 22-character ID instead.
  • In 6.2.2 (680fc91, "Register push on authentication") registration moved from login to authenticated. The 4.x web UI never sends authenticated, so on 4.x servers the app registered nothing and only the old long tokens remained. That's why sending authenticated from my 4.15 web UI fixed it.
  • 6.2.3 (d70aed4, "Support old notification flow") registers on login again, so unpatched 4.x servers should work again with 6.2.3.

The long tokens are old ones from 6.1.2 or earlier: the 4.15 web UI never removes old tokens.

So the "corner case" fixed by the Manager update was that 6.2.2 stopped registering on servers that only send login, which means every 4.x server. It would have saved me some time to know that here.

Anton Tananaev 18 hours ago

The only problem is that doesn't align timing wise. You said there was an issue before 6.2.2 was released.

mojiwunefela 17 hours ago

You're right, the timeline doesn't line up, and that's on my side, I don't remember exactly which Traccar Manager versions were installed and when.

What I know for sure is that after about 4 years, push notifications suddenly stopped working on all phones at the same time. The installed Manager versions were definitely not up to date, but I don't remember which ones. At that point I didn't know how push notifications worked in Traccar. I first updated to the latest Manager version available to me, then deleted the token. Every time I logged out and back in, a long token was generated, and it didn't work with Firebase. While you were probably releasing the latest Manager versions, I patched my old server to behave like the current master.

In any case, the long tokens still in the user attributes don't work anymore, I tested them again today and they are still rejected with registration-token-not-registered.

Anyway, thanks for your work.

Anton Tananaev 17 hours ago

Can you provide an example to test?

Anton Tananaev 17 hours ago

You can email to support if you don't want to share here.