Another valid token generated for same registration. Both send messages to same Chrome instance.
On clearing site data from Chrome, the token gets deleted. On subsequent load of app in Chrome, new token will be generated and stored in FCM and my server. Both the tokens are still valid according to FCM(I have tested this). I end up getting two notifications instead of one(since I will push message to both tokens). And as browser data gets cleared from time to time more tokens will keep getting generated, incrementing the problem. Is there a solution to this?
If you clear site data in Chrome, you should have a new service worker, meaning your old server worker should not be receiving a push message.
FCM can take some time before it learns the token is no longer valid.
That doesn't explain why you are getting two push messages. Can you provide me with exact reproduction steps so I can recreate it myself?
hello @sidyyy911, I have similar issue, how did you solve this problem ?
Hi, I wasn't able to get the time to recreate this scenario. But one of the possible reasons I was getting two messages could have been that I was registered using localhost and www.serverxyz.com for the same chrome client. Please check on that.