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

commented Mar 13, 2019

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,

This comment has been minimized.

Copy link
@chliangGoogle

chliangGoogle Mar 13, 2019

Collaborator

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

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maksymmalyhin maksymmalyhin deleted the mm/FIRInstanceID-crash-2534 branch Mar 14, 2019

@paulb777

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

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

@paulb777

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.