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

[v5] Pause operation repo and retry failed user create #1900

Merged
merged 1 commit into from
Dec 1, 2023

Commits on Nov 4, 2023

  1. pause operation repo and retry on failed user create

    Successful user creation is vital to the functioning of the SDK.
    
    Problem:
    If the create user request fails with an un-retryable error such as a 400 response, the SDK would not retry and stay in an unrecoverable error state with no onesignal_id, and no subscription_id (potentially). Therefore, it would never register, send data, or receive notifications. The only way out was to uninstall the app.
    
    Solution:
    Let's give the SDK a chance to recover from failed user creation, similar to the behavior of the iOS SDK. When met with this error, we will pause the operation repo from executing any more operations as it is impossible to do anything without a onesignal_id.
    
    Then, on new sessions or new cold starts, we will retry the still-cached operation, in the hopes that perhaps it can succeed at this later date.
    nan-li committed Nov 4, 2023
    Configuration menu
    Copy the full SHA
    0cf1eb9 View commit details
    Browse the repository at this point in the history