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

How to get failure (rollback) reason

Open anutting opened this issue 1 year ago • 3 comments

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:

  1. Use the class method (lol who is still using class components?) codePushStatusDidChange to watch for a CodePush.SyncStatus.UNKNOWN_ERROR
  2. 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?

anutting avatar Feb 14 '24 21:02 anutting

I also have this issue. Sometime I get update fail message on sentry. I really don't know the reason is.

tomcheung1208 avatar Feb 21 '24 06:02 tomcheung1208

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

DmitriyKirakosyan avatar Mar 04 '24 09:03 DmitriyKirakosyan

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.