-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
Error boundaries #636
Comments
Please upgrade to |
Is this working in React native? For me Fallback ui never shown, neither does onError gets invoked. |
Same here. it crashes on a device and I've tried both ways using @sentry/react-native and sentry-expo |
@jaybuangan @shubhamkes You can use the |
Thanks @jennmueng for the response. I've tried the example you linked and it just shows the regular Expo error. Maybe I'm testing it wrong. Would I see it in Expo Go? or would I have to create a build and install it on my iPhone? I've also set expo to run in Production mode since Expo doesn't work in debug mode on the simulator and still never shows the custom ErrorBoundary or just a element. This is what my App.tsx looks like
|
@jaybuangan What kind of error is it? Error boundaries only catch rendering errors and lifecycle methods FYI. |
@jennmueng I have a button that intentionally throws an error
and this error pops up in the simulator when I press it |
+1 |
@jaybuangan React error boundaries cannot handle errors in event handlers – see the docs. |
OS:
Platform:
Hey there!
I currently have trouble to figure out the right way to do error boundary components in react native with sending the errors to sentry correctly. The documentation for react describes this very good and straightforward but since this part uses
@sentry/browser
I thought the react native docs has an own section about this. But there is no information about how to make error boundaries in react-native by using thereact-native-sentry
package. Furthermore the required functions likeSentry.withScope
andSentry.captureException
are not even part of the package.Should I use the
@sentry/browser
package for this along with the react native sentry configuration?Regards!
Erik
The text was updated successfully, but these errors were encountered: