Fix user executor's requests from being blocked #1398
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Drop any cached Identify User requests that can never go through in order to prevent blocking of other pending requests and allow recovery.
Details
The logic of this PR is a small change in this commit: Drop insurmountable cached requests in the user executor
Motivation
An app developer through testing and usage of a debugging proxy ended up in a scenario where the SDK called
login
from an anonymous state, but is forever missing the onesignal ID to complete the Identify User call.logout
orlogin("another_user")
don't work as they are added to the executor queue but the queue is still blocked by the first request.Scope
Testing
Unit testing
None
Manual testing
Physical iPhone 13 with iOS 17.4
I was not able to naturally reproduce this state by a combination:
I reproduced this state by:
login("a")
, thenlogout()
,login("a")
,logout()
,login("a")
logout()
,login("a")
,logout()
,login("a")
are the pending requests"a"
and correct data for user"a"
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is