In a react native app using sentry, when a bug happens in javascript that crashes the app, sentry works perfectly. Furthermore, I sometimes see native ios & android errors in my Sentry reports, which leads me to believe that Sentry does report native crashes. This leads me to believe that my setup is correct.
However, when I explicitly try to test that native crashes are being reported by Sentry, Sentry doesn’t seem to be functioning correctly. For example, on a particular screen in my app that uses a particular native module, I’ll throw a native error in objective c, something like: [NSException raise:@"Invalid foo value" format:@"foo of %s is invalid", "foo"];
. On the android side in the same module, i’ll throw a runtime error: throw new RuntimeException("Test native bug android");
.
Both ios and android errors are not being reported to Sentry. Is there some additional configuration that is needed to report native crashes?
I know I didn’t give any tangible code examples in this post, so hopefully this description isn’t too vague.