react-native-code-push icon indicating copy to clipboard operation
react-native-code-push copied to clipboard

Force code push update to fail to test error handling cases/Best practice for handling code push upgrade error

Open feiyingx opened this issue 9 years ago • 2 comments

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

feiyingx avatar Jul 23 '17 19:07 feiyingx

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!

iageoghe avatar Aug 25 '17 17:08 iageoghe

Hi @feiyingx, I'm closing this, please feel free to reopen if you have any questions.

sergey-akhalkov avatar Aug 30 '17 10:08 sergey-akhalkov