Skip to content
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

Sentry is not sending global errors #32

Closed
wamphlett opened this issue Jul 4, 2018 · 5 comments
Closed

Sentry is not sending global errors #32

wamphlett opened this issue Jul 4, 2018 · 5 comments

Comments

@wamphlett
Copy link

I am having problems with global errors not getting sent to Sentry in development. This has been raised before in #23 however it was never officially answered and I feel there are still people experiencing the same thing. It would be nice to get an offical answer on it.

Sentry.enableInExpoDevelopment = true
Sentry.config('DSN'}).install()

Sentry.captureMessage('TestMessage') // expected result
Sentry.captureException(new Error('TestError')) // expected result

throw new Error('TestError') // Not in Sentry

Is this expected in development, am I missing something, or is there something wrong here?

@brentvatne
Copy link
Member

errors in development are caught by a global error handler in expo then passed along to the original handler: https://github.com/expo/expo/blob/deb7e9497ed09f5e1f5ca3409f2b6d020d15646e/packages/expo/src/launch/RootErrorBoundary.tsx#L21-L52

if you can post an example project with this problem i'd be happy to look!

@gerbus
Copy link
Contributor

gerbus commented Jan 7, 2019

@wamphlett, are you sure that your error isn't being caught (and not being rethrown) by a higher level in your application? Just a thought because that's what was happening in my case.

@brettdh
Copy link

brettdh commented Mar 17, 2019

@brentvatne I've got one:

https://github.com/theliturgists/app/pull/159

Nothing shows up in Sentry. Not sure if there's a better way to test that I've hooked things up correctly, but this seems like a pretty simple error that ought to be reported. (It causes a redbox in development)

@brettdh
Copy link

brettdh commented Mar 19, 2019

FWIW, Sentry.captureMessage works fine with my configuration.

@brettdh
Copy link

brettdh commented Mar 19, 2019

Hmm. Tried again with my dev server running in production, and Sentry received the error this time (albeit after a delay). I guess I'll chalk this up to me not realizing that no errors are reported if they result in a dev redbox (per getsentry/sentry-react-native#6).

(And with me not realizing that sentry-expo is a thin wrapper around react-native-sentry)

@cruzach cruzach closed this as completed May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants