-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Messaging didReceiveRegistrationToken called twice on startup after deleting and reinstalling app #6813
Comments
Can you share the |
@morganchen12 Of, course. Here's everything Firebase related (Analytics, Crashlytics, Messaging)
|
Can you share all Firebase debug Logs when you reproduce? Here's how you can get the debug logs: To enable debug logging set the following application argument: -FIRDebugEnabled (see http://goo.gl/RfcP7r) |
@chliangGoogle Here you go.. I created a gist, as it was rather long. Can paste it here also, if you need. |
Same issue for me |
Hi @petkotodorov This is expected. We recently discover that sometimes, the APNS token is collected from Apple with a slight delay after first token request was issued, so client has to issue a second token request with the apns token mapping in it. So you are getting that scenario which is why you are getting the token callback twice. It wasn't happening before because there was a bug that the second token request is not triggered and was recently fixed in #6669. This should not affect your work as long as you always keep your token updated with the Messaging didReceiveRegistrationToken: callback. |
[REQUIRED] Step 1: Describe your environment
CocoaPods
[REQUIRED] Step 2: Describe the problem
didReceiveRegistrationToken
is being called twice on first start after deleting and installing app. In that case, app is not receiving notifications. It is not happening, when this is first ever install on the particular device.Steps to reproduce:
didReceiveRegistrationToken
is called once with token (as expected)didReceiveRegistrationToken
is called twice. First time with the token from previous installation. And a second later,didReceiveRegistrationToken
called again with new token.didReceiveRegistrationToken
is called once and all is goodIf you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.
Relevant Code:
The text was updated successfully, but these errors were encountered: