react-native-code-push
react-native-code-push copied to clipboard
429: Rate limit issue when using codePush(MyApp) HOC wrapper
How to avoid the Rate limit warning which is reporting issue in Firebase when HOC is used to download codepush?
I have below code in my App.js which is a functional component while App.js is further connected using
AppRegistry.registerComponent(appName, () => codePush(BuildProperties.getCodePushOptions())(App));
codePush.sync(
BuildProperties.getCodePushOptions(),
(status) => {
if (!BuildProperties.showCodePushUpdate())
return;
switch (status) {
case codePush.SyncStatus.CHECKING_FOR_UPDATE:
setUpdateText(Strings.checkingUpdate);
break;
case codePush.SyncStatus.DOWNLOADING_PACKAGE:
setUpdateText(Strings.downloadingUpdate);
break;
case codePush.SyncStatus.INSTALLING_UPDATE:
setUpdateText(Strings.installingUpdate);
break;
default:
break;
}
},
(progress) => {
if (!BuildProperties.showCodePushUpdate())
return;
console.log(progress.receivedBytes + " of " + progress.totalBytes + " received.");
let percentageProgress = parseInt(parseFloat((progress.receivedBytes / progress.totalBytes)).toFixed(2) * 100)
setUpdateText(percentageProgress + '% downloaded');
setCodepushProgress(percentageProgress)
}
).then((response) => {
console.log('codepush-syncstatus:', response);
}).catch((error) => {
//Actual codepush error will occur here 429 -> Rate limit is exceeded
setUpdateInProgress(false)
console.log('Error performing CodePush sync:', error);
});
Hi @imanshul could you please confirm what this issue still persist on latest version (8.2.1)
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.
This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.