Sentry-react-native: cannot send native crash from android (simulator)

Created on 12 Feb 2019  ·  5Comments  ·  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [Y] MacOS
  • [ ] Linux

_Platform:_

  • [ ] iOS
  • [Y] Android

v8.11.1
5.6.0
├── @lingui/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]


Native crash on android, which I triggered by Sentry.nativeCrash, could not be delivered to sentry. iOS is fine. Please help fix it

Steps to reproduce:
Step 1, put the follow try catch block as an onPress callback
try { Sentry.nativeCrash(); } catch (err) { Sentry.captureException(err); }
Step 2, initiate the app (I did it through simulator)

Step 3, click and wait for a native crash

Actual result:
No error is reported if it is on android. iOS is fine

Expected result:
Native crash should be reported from both android and iOS

🦔react-native-sentry

Most helpful comment

problem solved. android native crash event is only reported from real devices

All 5 comments

I have made sure MainApplication.java has the following code

`
import io.sentry.RNSentryPackage;

public class MainApplication extends Application implements ReactApplication {
protected List getPackages() {
return Arrays.asList(
new MainReactPackage(),
new RNSentryPackage(),
)
}
`

problem solved. android native crash event is only reported from real devices

Is this expected behavior? In my opinion errors from JS and native should be reported in the simulator.

It seems that on debug, the error is swallowed by the red screen. The app is not crashing.

I am closing all old issues, please if this is still a problem feel free to revive it.
Also, consider moving to our new SDK @sentry/react-native if it still happens there please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings