Troubleshoot React Native source maps and JavaScript errors
Use this page to troubleshoot React Native source map uploads and MobileJSError symbolication. To learn how to upload source maps, see React Native JavaScript error reporting.
Troubleshooting
Source map errors in the UI
If you see any of the following errors in the UI, either your source map file is missing the sourcesContent attribute, or the metadata submitted with the upload (sourcemapName, jsBundleId, or appVersion) doesn't match the values the app reports for that build:
Source map not found.
Source map missing.
Incorrect map detected.
Incorrect and missing maps detected.
First, confirm the sourcemapName, jsBundleId, and appVersion used for the upload match the values the app reports for that build (see Why don't my line numbers match?). If the metadata matches, your source map must include the sourcesContent attribute for New Relic to un-minify your stack traces. Regenerate the source map so it includes this attribute, then upload it again. Most bundlers include the original source content when you enable an option such as includeSources (or the equivalent for your build tool).
You have a React Native app but don't see the menu item
If you have a React Native app but don't see the React Native menu item in the UI, check that you're on an updated agent version and that your app is sending data. The menu item doesn't appear until the app sends data tagged with the React Native platform.
You don't see both MobileJSError and handled exception events
With the new agent version, you won't see both MobileJSError events and handled exception events for the same JavaScript errors. JavaScript errors are recorded as MobileJSError events instead.
New Relic currently supports MobileJSError for React Native only. Capacitor and Cordova aren't supported.
Frequently asked questions
Yes. You can upload a gzipped or zipped (.zip) source map. The build scripts automatically zip large .map files before upload.
200 MB unzipped. New Relic doesn't store source maps larger than 200 MB unzipped for symbolication. It sends build telemetry instead. For details, see File size limitations.
Code snippets require the sourcesContent attribute in your source map. If your source map doesn't include the original source content, New Relic can still un-minify the stack trace using line and column mappings, but it can't display the surrounding source code. Regenerate the source map with an option such as includeSources enabled (or the equivalent for your build tool), then upload it again.
Line numbers don't match when the uploaded source map doesn't correspond exactly to the JavaScript bundle that produced the error. Make sure the jsBundleId and appVersion used for the upload match the values the app reports for that build — this is especially important after a CodePush or other over-the-air (OTA) update, when the JavaScript bundle diverges from the native binary version. Also confirm your source map is version 3.
No. New Relic's React Native symbolication supports only a single source map file, matching Metro's default (non-multi-bundle) symbolicator. If your app splits its JavaScript into multiple bundles and generates multiple source maps, New Relic doesn't support symbolication for that setup.