microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.91k stars 1.45k forks source link

Recovering after being rate limited #2727

Closed johnpwrs closed 3 weeks ago

johnpwrs commented 1 month ago

Steps to Reproduce

  1. Configuration:
    
    const codePushOptions: CodePushOptions = { 
    checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
    installMode: codePush.InstallMode.ON_NEXT_SUSPEND,
    minimumBackgroundDuration: 60,
    mandatoryInstallMode: codePush.InstallMode.IMMEDIATE,
    rollbackRetryOptions: {
    maxRetryAttempts: 48,
    delayInHours: 1
    }
    };

...

AppRegistry.registerComponent('MyApp', () => codePush(codePushOptions)(Root));


2. Receive rate limit error `{ "statusCode": 429, "message": "Rate limit is exceeded. Try again in 58 seconds." }` before latest version is downloaded
3. Attempt in 58 seconds
4. Still receive no update

### Expected Behavior
I'd expect after being rate limited, after X seconds has passed, on the next app resume a download will happen

### Actual Behavior
Seemingly never recover or receive update after being rate limited.  After being rate limited, seemingly the only way to recover is If i delete the app and reinstall, or push a brand new update to appcenter.

### Environment

* react-native-code-push version: 8.2.2
* react-native version: 0.73.5
* iOS/Android/Windows version: iOS 17.5.1
* Does this reproduce on a debug build or release build? release build
* Does this reproduce on a simulator, or only on a physical device? physical device

I'm really looking for some guidance or clarification on what is supposed to happen after being rate limited.  At what point will I be able to receive the update after this happens?  Is there anything I should be doing differently to ensure that a user will still receive an update after they've been rate limited?
johnpwrs commented 1 month ago

https://github.com/microsoft/react-native-code-push/issues/2527

this might actually be my issue. the behavior i am experiencing is exactly as described here, and i think i didn't see the 404s at first, among all the rate limiting errors.

DordeDimitrijev commented 1 month ago

Hello @johnpwrs thank you for reaching out. I tried to reproduce the issue on blank react-native app but after the timeout the api call gets called successfully on my side after rate limiting, so i assume there might be some issues with configuration. Could you please share a small demo app which reproduces this issue so i can investigate it further?

DmitriyKirakosyan commented 3 weeks ago

Closing due to inactivity.