Sentry added support for react-native builds that use the hermes engine, which required changes to the Sentry SDK, sentry-cli as well as Sentry itself.

Sentry customers using the

SaaSSentry's cloud-based, software-as-a-service solution.
product ( will need to update the SDK, and sentry-cli. The minimum required version for the SDK is @sentry/react-native SDK version 1.3.3, and @sentry/cli version 1.51.1.

For self-hosted Sentry users, the minimum version required is f07352b.

Once you have the minimum version of the SDK, Sentry provides the standard integration as described in the React Native Sentry documentation.

Source Maps

If you do not need custom source maps, the sentry.gradle build step fully supports Hermes source maps.

Custom Source Maps

This document walks through the steps to manually generate and upload custom source maps. When generating your source maps, it's important to match the steps of your React Native tooling exactly, otherwise the generated bundle won't work correctly, and your errors may point to unrelated lines.

The React Native tooling steps are extracted from for iOS and from BundleHermesCTask.kt for Android.

Compile Source maps

Depending on how your app bundle was generated not all these compilation steps are required:

  • If you use EXTRA_PACKAGER_ARGS on iOS, only the first step applies. This is the default behavior if you used @sentry/wizard.
  • If you use SOURCEMAP_FILE, all steps are necessary.
  1. Bundle/minify with metro (react-native) to get the bundle (.bundle or .jsbundle) and packager source map (.map):
npx react-native bundle --platform android --dev false --entry-file index.js --reset-cache --bundle-output --sourcemap-output --minify false
  1. Compile to bytecode using hermes to get the compiler source map (

If you're using Hermes with React Native 0.68 or below:

node_modules/hermes-engine/{OS-BIN}/hermesc -O -emit-binary -output-source-map
rm -f

Starting with React Native 0.69, hermes has been shipped with React Native, so you should use hermesc from react-native:

node_modules/react-native/sdks/hermesc/{OS-BIN}/hermesc -O -emit-binary -output-source-map
rm -f
  1. Merge the two source maps using compose-source-maps to get the final source map (.map):
node node_modules/react-native/scripts/compose-source-maps.js -o

Upload the Bundle and Source Maps

Upload your source maps following Step 3 on the normal source maps guide.

Upload Using Sentry Fastlane Plugin

To upload generated sourcemaps using Fastlane, use the sentry_upload_sourcemap action. See how to install Sentry Fastlane Plugin here.

  auth_token: 'sntrys_YOUR_TOKEN_HERE',
  org_slug: 'example-org',
  project_slug: 'example-project',
  version: '...',
  app_identifier: '...', # bundle_identifer of your app
  build: '...', # optional build number of your app
  dist: '...', # optional distribution of the release usually the buildnumber
  sourcemap: ['', ''],
  rewrite: true
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) to suggesting an update ("yeah, this would be better").
Suggest an edit to this page   |  Contribute to Docs   |  

Report a Problem

🎉 Thank you for your feedback! 🙌
Report a problem