Skip to content
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

FIRInstanceIDCheckinService: make sure tasks are not submitted to an invalidated NSURLSession #2548

Merged
merged 3 commits into from
Mar 14, 2019

Conversation

maksymmalyhin
Copy link
Contributor

A quick fix for the issue #2534.

  • make sure tasks are not submitted to an invalidated NSURLSession
  • log an error in case when this may have happened

Looks like there is a race condition involving FIRInstanceID/FIRInstanceIDTokenManager/FIRInstanceIDAuthService/FIRInstanceIDCheckinService. I was not able to find a core reason why the issue may happen so far.

The PR just fixes the particular consequence of the race condition to mitigate the impact on users while we are looking for a better solution.

@@ -65,6 +65,7 @@ typedef NS_ENUM(NSInteger, FIRInstanceIDMessageCode) {
kFIRInstanceIDMessageCodeService004 = 7004,
kFIRInstanceIDMessageCodeService005 = 7005,
kFIRInstanceIDMessageCodeService006 = 7006,
kFIRInstanceIDMessageCodeService007 = 7007,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we start giving the message code a meaning instead of a repeat number.
So you can do sth like kFIRIntsanceIDInvalidNetworkSession.

@maksymmalyhin maksymmalyhin merged commit ff76c8a into master Mar 14, 2019
@maksymmalyhin maksymmalyhin deleted the mm/FIRInstanceID-crash-2534 branch March 14, 2019 01:08
@paulb777
Copy link
Member

@ryanwilson @chliangGoogle Should this PR be cherry-picked to M45?

@paulb777
Copy link
Member

Added to M45.

@chliangGoogle Please close any relevant issues and update the release notes.

@paulb777 paulb777 added this to the M45 milestone Mar 14, 2019
@firebase firebase locked and limited conversation to collaborators Oct 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
5 participants