question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught errors are not captured on React Native

See original GitHub issue

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 calling ErrorUtils.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?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
HazATcommented, May 10, 2017

Hey, Check out our official client for react-native -> https://github.com/getsentry/react-native-sentry Closing this here since it’s obsolete. If you’re still having troubles, please create an issue there. Thanks

1reaction
Kerumencommented, Jul 26, 2016

Thanks. I still have some troubles with CodePush and Sentry. Can you help me? I reached you on Twitter 😃 Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to handle errors globally in react native? - Stack Overflow
react -native-exception-handler is a react native module that lets you register a global error handler that captures fatal/non-fatal uncaught ...
Read more >
Handling Errors in React Native: A Complete Guide
react -native-exception-handler is a react native module that lets you register a global error handler that captures fatal/non-fatal uncaught ...
Read more >
React Native Error Handling Best Practices - Rollbar
React Native has its own mechanism to handle uncaught exceptions. This allows you to track the error, display a message to the user, ......
Read more >
Error Boundaries - React
As of React 16, errors that were not caught by any error boundary will result in unmounting of the whole React component tree....
Read more >
react-native-exception-handler - npm
A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found