Skip to content

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

Merged
maksymmalyhin merged 3 commits into
masterfrom
mm/FIRInstanceID-crash-2534
Mar 14, 2019
Merged

FIRInstanceIDCheckinService: make sure tasks are not submitted to an invalidated NSURLSession#2548
maksymmalyhin merged 3 commits into
masterfrom
mm/FIRInstanceID-crash-2534

Conversation

@maksymmalyhin

Copy link
Copy Markdown
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.

Comment thread Firebase/InstanceID/FIRInstanceIDCheckinService.m
Comment thread Firebase/InstanceID/FIRIMessageCode.h Outdated
kFIRInstanceIDMessageCodeService004 = 7004,
kFIRInstanceIDMessageCodeService005 = 7005,
kFIRInstanceIDMessageCodeService006 = 7006,
kFIRInstanceIDMessageCodeService007 = 7007,

Copy link
Copy Markdown
Member

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.

Comment thread Firebase/InstanceID/FIRInstanceIDCheckinService.m
Comment thread Firebase/InstanceID/FIRInstanceIDCheckinService.m
@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
Copy Markdown
Member

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

@paulb777

Copy link
Copy Markdown
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants