Native crash reporting with Sentry

I’m in the midst of migrating an application the EAS build system in order to get native crash reporting, per the docs:

Note: Native crash reporting is not available with the classic build system ( expo build:[ios|android] ), but is available via EAS Build.

I accidentally published an OTA update (via expo publish) which a bug in it which consistently causes a native crash. However the issue has not appeared in our Sentry account.

Is there anything in particular I need to do to enable native crash reporting beyond initialising the library as usual?

Here’s the setup:

// sentry.js
import * as Sentry from 'sentry-expo';
import * as Updates from 'expo-updates';
import Config from '../config';
import { RevisionId, Version } from '../utils/constants';

Sentry.init({
  dsn: Config.SENTRY_DSN_PUBLIC,
  enableInExpoDevelopment: false,
  enableAutoSessionTracking: true,
  initialScope: {
    revisionId: Updates.manifest.revisionId,
    version: Version,
  },
});

export default Sentry;

// App.js, used with `registerRootComponent`
...
export const SentryWrappedApp = Sentry.Native.wrap(App);

Hi @zenmaiddev

I think the only other thing you need to do is add the config plugin to your app.json.

Thanks @wodin. Indeed seems that way. We weren’t getting anything through until we released to production via app store. All resolved now :+1:

1 Like