OS:
_Platform:_
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
I have made sure MainApplication.java has the following code
`
import io.sentry.RNSentryPackage;
public class MainApplication extends Application implements ReactApplication {
protected List
return Arrays.
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.
Most helpful comment
problem solved. android native crash event is only reported from real devices