sentry-react-native
sentry-react-native copied to clipboard
Catching native app launch crashes - "Symbol not found: (_JSGlobalContextSetInspectable)"
OS:
- [ ] Windows
- [x] MacOS
- [ ] Linux
Platform:
- [x] iOS
- [ ] Android
SDK:
- [x]
@sentry/react-native
(>= 1.0.0) - [ ]
react-native-sentry
(<= 0.43.2)
SDK version: 5.19.3
react-native
version: 0.72.13
Are you using Expo?
- [ ] Yes
- [x] No
Are you using sentry.io or on-premise?
- [x] sentry.io (SaaS)
- [ ] on-premise
If you are using sentry.io, please post a link to your issue so we can take a look:
N/A
Configuration:
Sentry.init({
dsn: '...',
environment: '...',
enableOutOfMemoryTracking: false,
tracesSampleRate: 0,
debug: !!__DEV__,
ignoreErrors: [...],
beforeBreadcrumb: excludeGraphQLFetch,
release: '...',
});
I have the following issue:
We had an incident a couple of months ago that was causing our app to crash on startup. Unfortunately, this wasn't reported to us by Sentry as we're initialising sentry on the React side of our app, this was a native crash before Sentry was initialised. We want to ensure that we capture these kinds of errors in Sentry in the future.
For clarity, this was the error we faced: https://github.com/facebook/react-native/issues/44077
I've instrumented Sentry natively for both iOS & Android following the documentation, and have confirmed it's working when firing captureMessage natively.
However, when I reintroduce the bug linked above (downgraded to react-native 0.72.13 and disabled hermes) and then open the app on a device using iOS 14 (any version 16.3 and lower should work) it crashes but this crash is not fired to Sentry. It seems like this error may be happening even before Sentry is initialised here and thus not firing?
Is it possible to capture this kind of error in Sentry, perhaps there a way we can initialise Sentry even earlier?
Steps to reproduce:
- Use react-native 0.72.13
- Disable hermes
- Instrument sentry natively
- Run app on real device using iOS 14 (version 16.3 and lower should be fine, but I've tried on iOS 14 and verified)
Actual result:
App crashes but error is not reported to Sentry
Expected result:
App crash but error is reported to Sentry