react-native-code-push
react-native-code-push copied to clipboard
How to get failure (rollback) reason
I am just starting to use CodePush in a new application so far I released a couple updates successfully, however this recent third update was not installed correctly. I read through the documentation and do see there are two ways to get the status of an install:
- Use the class method (lol who is still using class components?)
codePushStatusDidChange
to watch for aCodePush.SyncStatus.UNKNOWN_ERROR
- Use CodePush.sync's second function parameter which is passed the status.
Neither of these methods for detecting a failure actually provide a failure reason.
My question is what is the best way to get a failure to install reason so that I can log it to Analytics and actually attempt to fix the failure?
I also have this issue. Sometime I get update fail message on sentry. I really don't know the reason is.
Hi @anutting and @tomcheung1208 , thank you for reaching out!
There isn't a dedicated API for getting a reason for a CodePush failure. However, if you can access the device on which the error occurred, I recommend checking the device's logs. These logs may contain errors reported by CodePush or any related issues within your app that could help troubleshooting the cause of the failure.
Related thread: https://github.com/microsoft/react-native-code-push/issues/1099
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.