I recently integrated sentry into my expo react-native project. I used the setup suggested in the docs and in the forums that I’ve read
import Sentry from 'sentry-expo';
import {SentrySeverity, SentryLog} from 'react-native-sentry';
Sentry.enableInExpoDevelopment = true;
Sentry.config(
SENTRY_DSN,
{
logLevel: SentryLog.Debug
}
).install();
When I call test errors such as these provided in the docs
// set a custom message
Sentry.captureMessage("TEST message", {
level: SentrySeverity.Warning
}); // Default SentrySeverity.Error
// capture an exception
Sentry.captureException(new Error('Oops!'), {
logger: 'my.module'
});
the test errors above come through instantly. But when I actually compile my app via Expo and TestFlight and incite the actual crash that led me to want to get Sentry, the app just crashes, I re-launch the app (for some reason this crash doesn’t auto-reload the app, I have to tap the app to reload it) and I get no errors to my dashboard.
I’ve also confirmed in my production build that the test errors fire, but my actual crash is not reported.
Hi @HazAT, sorry for the delayed reply. I finally figured out what the issue was. Our app was being killed by jetsam, the iOS memory management app-killer.
For that reason, it wasn’t really a “crash” as much as a “kill”, so maybe Sentry classifies these differently, or maybe doesn’t have access to when we’re killed? I have since gotten all of the other true crashes that have occurred, but it would be very helpful if Sentry also supported jetsam OS kills, since this might be a problem again moving forward, and it would be equally helpful to get these notifications from the field.
Is there a feature request page where I can request this, or is logging it here good enough?
To be honest, we probably will not invest much time in this now since this is a uncommon edge case.
If you are running sentry-expo we have no way in detecting “native” stuff since there is no native component.
The only way possible would be to use react-native-sentry which uses sentry-cocoa which uses KSCrash but like I said, we probably not invest into this right now.
We are open to pull requests though