I have a website and I use Firebase to deliver push notifications to my visitors' browsers.
After upgrading from Firebase 4.9.1 to 4.10.0 I noticed that my own browsers were receiving the same push notifications twice. I also noticed lots of new token registrations on my backend database and these new tokens came from browsers that were already registered before.
After a little bit of research here's what I've found out:
It seems that Firebase versions < 4.10.0 were storing FCM token data on an indexedDB named "undefined". After upgrading to 4.10.0 Firebase started saving FCM token data on an indexedDB named "fcm_token_details_db". That resulted in two valid tokens registered in two different indexedDBs. Both tokens seemed to work fine when notifications were sent to them, none of them returned NotRegistered.
I'm not sure that indexedDB named "undefined" is a result of my (probably bad) coding, but I guess it is an issue with old Firebase versions. It was working fine before, but now that the name of the indexedDB changed I think it will result in duplicate notifications for every site that upgrades from versions < 4.10.0 to version 4.10.0.
I'm also not sure if it is the best solution here, but deleting that "undefined" indexedDB seems to fix the issue:
indexedDB.deleteDatabase("undefined");
Do you guys think it is worth a GitHub issue? I can provide more information about my code and my site's setup if more troubleshooting is needed.
Thanks in advance,
César