sentry-react-native: Unhandled JS Errors are not registered in iOS
Platform:
- iOS
- Android
SDK:
-
@sentry/react-native(>= 1.0.0) -
react-native-sentry(<= 0.43.2)
SDK version: 1.4.2
react-native version: 0.62.1
Are you using Expo?
- Yes
- No
Are you using sentry.io or on-premise?
- sentry.io (SaaS)
- on-premise
Configuration:
(@sentry/react-native)
Sentry.init({
dsn:
'https://14....@o74....ingest.sentry.io/5.....',
debug: true,
});
I have following issue:
Can’t get Sentry to report unhandled JS crashes
Steps to reproduce:
- Install & init Sentry
- make React Native build and put to TestFlight (Archive/Release)
- throw Error in on of Screens
Actual result:
After getting to screen with Error the app crashes immediately without report to be sent
Expected result:
App is sending the report before termination
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 4
- Comments: 40 (11 by maintainers)
Hi @HazAT , are there any updates on this issue? Still experience it on versions 1.4.2/1.4.5
I just upgraded to react-native-sentry@1.7.1 and react-native@0.63.2 and it seems to be working !!
OK, I think I found the issue. It was not exactly what I thought, working on a fix.
Can confirm that calling Sentry.captureException() does indeed report the correct error event and that I can see the stack trace.
Also using 1.4.2 and am seeing this behavior. Downgrade to 1.4.1 did not resolve the issue, however 1.3.7 did work for me as expected. Any ideas for a quick fix? We would love to upgrade to the latest version as soon as possible. If you need any further information let me know 😃
I just tested again on 1.6.2, and found that these errors ARE showing up, they’re just delayed, and possibly only get reported when another event is sent. I thought that they weren’t showing up at all, because I tested uncaught exceptions last, and didn’t go back and check those issues. When one randomly showed up today, I clicked through old instances, and found there were actually a bunch. They show up with their original timestamp, so when I refreshed the page looking for new reports, I didn’t notice that the count on the old instances had gone up.
Same problem on 1.6.1 & RN 0.59.10. I had to go down to 1.3.7 and it worked.
Hello I have the same issue. Get sentry reports when Android crashes and don’t get any when iOS crashes.
I have: react-native 0.61.0 @sentry/react-native: ^1.4.4
With sentry version 1.3.7 it was working fine
Thank you very much. For me its fixed in 1.4.4 👍
@gramotei @dehlen Can you please upgrade to
1.4.4and make sure you also install latest sentry-cocoa withpod installAfter that try it again, make sure when in release mode and the app crashes we send the report after the restart.
Cool ok, I am trying to reproduce this locally in the sample project we have. To explain the problem (that I expect): The exceptions
[error][tid:com.facebook.react.JavaScript] Error:like this with the attached JS stack trace should never bubble up to native like this. Usually, our SDK catches it in JS, prepares it there, and forwards the finished event to native (which in both of your cases is not happening). Instead, it seems we skip the JS part and the exception gets forwarded to native immediately where our iOS SDK picks up an unhandled exception.