Force code push update to fail to test error handling cases/Best practice for handling code push upgrade error
Description
Hi I was wondering if there are guidelines/best practices for how to deal with failed code push updates. Also in terms of testing, how can we induce a code-push update fail so we can test out the error case?
Additional Information
- react-native-code-push version: 2.1.0-beta
- react-native version: - 0.44.3
Hi @feiyingx, the answer to your first question really depends on what the root cause of the failed update is. If a release is made with React Native code that crashes on installation, then CodePush will automatically rollback to the previous released version; in fact, this is one answer to your second question: write code that crashes on load. In this case, the answer to your first question is: release a good update. If the update is good and/or there is some unknown reason for failure, then I would recommend a client-side solution. One user suggested that we add built-in configurable retry logic; in the absence of such a feature now, you could try your hand at adding it yourself. I hope that helps!
Hi @feiyingx, I'm closing this, please feel free to reopen if you have any questions.