You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
React-Native: Sourcemaps not working for JS errors in Android app #873
The crash reports are not mapped to actual code location for JS errors happening in Android app
What is the expected behavior?
The crash report should show the actual line of code where the error happened. This is working as expected for the iOS app but not for the Android app. I have uploaded the bundle and the map files for both the OSes to Sentry. The bundle and the sourcemaps for Android are generated using the following command:
Below is the screenshot of the bundle and the map file present on Sentry
Below is a screenshot of the how the crash report is shown on Sentry
As seen, the error is not mapped to the actual source file.
On iOS, the same error is mapped to the correct source file.
Which versions of Raven.js, and which browser and OS are affected by this issue? Did this work in previous versions of Raven.js? Are you using the CDN (http://ravenjs.com)? Are you using hosted Sentry or on-premises? If on-premises, which version (e.g. 8.7.0)?
raven-js: 3.7.0 installed via npm
It has not worked on Android for me.
Hosted Sentry
Just realized that there are some extra troubleshooting steps added to debug problems related to sourcemaps. I tried to verify the sourcemap locally using the steps mentioned. Using the above stack trace, I used line number as 164234 and column as 7766. I got { source: null, line: null, column: null, name: null } as response. When I use line number as 1 and column as 7766, then I get
Some more investigation notes, I tried the same test with iOS sourcemap. I tried to decode an error at main.jsbundle:682:12831. So, I used the line number as 682 and the column number as 12831 and it resolved to the correct code location.
So, is with the reported line number and the column number in the Android error?
Would this be a problem with react-native in that case?
Would this be a problem with react-native in that case?
If you're using source-map and got that result, seems so. I'd open an issue on the react-native project. If you could put together a minimal example for them, they'd probably act on it quickly.
This now has native android support and a gradle built step which builds and uploads sourcemaps.
I am closing this since this is mainly react-native related if the issues persist create an issue in the other repo please.
Activity
varungupta85 commentedon Mar 1, 2017
Just realized that there are some extra troubleshooting steps added to debug problems related to sourcemaps. I tried to verify the sourcemap locally using the steps mentioned. Using the above stack trace, I used line number as 164234 and column as 7766. I got
{ source: null, line: null, column: null, name: null }as response. When I use line number as 1 and column as 7766, then I getas the response which is also not the correct source location.
I have verified tha the `sourceMappingURL is present in the bundle file.
varungupta85 commentedon Mar 1, 2017
Some more investigation notes, I tried the same test with iOS sourcemap. I tried to decode an error at
main.jsbundle:682:12831. So, I used the line number as 682 and the column number as 12831 and it resolved to the correct code location.So, is with the reported line number and the column number in the Android error?
Would this be a problem with
react-nativein that case?benvinegar commentedon Mar 1, 2017
If you're using
source-mapand got that result, seems so. I'd open an issue on the react-native project. If you could put together a minimal example for them, they'd probably act on it quickly.atticoos commentedon Mar 2, 2017
I'm having a similar issue with source maps within a React Native project on Sentry.
Source code not found errors
Each report comes with this warning:
"Original" stack trace
"Minified" stack trace
As you can see, they're expandable, so the sourcemap appears to be working
And there certainly are artifacts for the release
atticoos commentedon Mar 2, 2017
Seems potentially related to getsentry/sentry#3224, via getsentry/sentry#3976?
misterecco commentedon Apr 18, 2017
@ajwhite If you still get Source code not found errors you can try using
--rewriteoption when uploading source map with sentry-cliHazAT commentedon May 10, 2017
Hey,
Check out our official client for react-native -> https://github.com/getsentry/react-native-sentry
This now has native android support and a gradle built step which builds and uploads sourcemaps.
I am closing this since this is mainly react-native related if the issues persist create an issue in the other repo please.
Thank you
fix(webpack): Deduplicate webpack deploys (getsentry#875)