I'm forcing my app to crash and also doing
Sentry.captureException(new Error('Oops!'), {
logger: 'my.module'
});
but I don't see the exception getting logged in Sentry dashboard.
I see the error and stacktrace in the raven-js module:
https://github.com/getsentry/raven-js/blob/master/src/raven.js#L1498
but when going deeper to the Objective-C native module. I see the event here:
https://github.com/getsentry/react-native-sentry/blob/master/ios/RNSentry.m#L343
But the RCTExceptionsManagerDelegate delegate never gets fired:
https://github.com/getsentry/react-native-sentry/blob/master/ios/RNSentry.m#L397-L415
On the iOS simulator, i see the react native red box error dialog.
Is it not sending to sentry because i'm in development mode?
captureMessage works perfectly.
i see this on startup
Sentry Started -- Version: 3.0.11
************************ Crash Handler Notice ************************
* App is running in a debugger. Masking out unsafe monitors. *
* This means that most crashes WILL NOT BE RECORDED while debugging! *
**********************************************************************
this is related to the issue?
setting: disableNativeIntegration: true fixes my issue... but am I losing native stack trace?
Same issue, even running the app directly on my iPhone doesn't send an event. Any solution?
I am currently refactoring the whole system, it grew over time and now it's time to refactor it, stay tuned.
@cwagner22 Does captureMessage work?
@HazAT Yes I just tried it, captureMessage is indeed working. Not sure why captureException is not.
Sadly that's a weird constellation that never has been tested before, there are a few places in the code checking if the app is running in DEBUG or not;
In Javascript (raven) as well in Objective-C (native), this will now be streamlined to make sure it's
consistent no matter how you run your app.
Is there a way to force it to send crash events even in debug mode?
I also even tried to build the app in release mode on my device but still no luck. Since it's my first day using sentry with RN I wasn't sure if I was doing something wrong.
Yeah, don't use captureException just call throw new Error('Oops'); instead of
Sentry.captureException(new Error('Oops!'));
@HazAT so is this a confirmed bug?
@HazAT Actually throwing an exception doesn't send any event as well for me.
Hey, please upgrade to 0.13 this should all be resolved :)
Thanks @HazAT, I was having the same problem, after upgrading to 0.13 errors are being sent to Sentry from iOS the debugger.
I still can't see exceptions in Sentry. I can see them If I do Sentry.captureException(throw new Error('error for sentry')). However, If there is any error thrown directly like throw new Error('error for sentry') then I can't see it in Sentry. However, I can see exception in logs. Also, there is no luck for me to send error in production mode if app crashes.
react-native: 0.44
react-native-sentry: 0.14.3
Yeah still the app crashes are not reported when called with throw new Error('Dev testing error to be ignored');
But are available on dashboard when called through Sentry.captureException(new Error('Dev testing error with captureException to be ignored'));
version:
"react-native-sentry": "^0.39.0"
Any updates on this? We are running a Serverless lambda, and have the serverless-sentry-lib installed. If we throw new Error('Foo') it's not picked up by Sentry
Most helpful comment
I still can't see exceptions in Sentry. I can see them If I do
Sentry.captureException(throw new Error('error for sentry')). However, If there is any error thrown directly likethrow new Error('error for sentry')then I can't see it in Sentry. However, I can see exception in logs. Also, there is no luck for me to send error in production mode if app crashes.react-native: 0.44react-native-sentry: 0.14.3