-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Uncaught errors are not captured on React Native #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have the same problem, in production no errors are logged. I don't understand your workaround to get this working. |
@Kerumen . Sorry. My description was a suggestion for how to fix the library, rather than a workaround for users, which is why it was confusing. To understand how to change the behaviour yourself, I'd recommend reading through this library's React Native plugin: https://github.com/getsentry/raven-js/blob/master/plugins/react-native.js#L59 . You'll see where it calls To restart the app when there is an error, I used |
Thanks. I still have some troubles with CodePush and Sentry. |
This will likely be addressed by #626 |
Hey, |
When using Raven in ReactNative, any error that is thrown outside of a
try-catch
block is not captured. It looks like there was an attempt to capture by callingErrorUtils.setGlobalHandler
. Unfortunately, in production the errors are never captured because the app crashes before the request is complete.One option is to skip the
defaultHandler
, which is what causes the app to crash. However, the best behaviour is application-specific.Perhaps the best solution is to avoid attempting calling
ErrorUtils.setGlobalHandler
at all in the React Native plugin, and instead to provide documentation for users to do it themselves?The text was updated successfully, but these errors were encountered: