sentry-react-native: Source code was not found for app:///main.jsbundle
OS:
- Windows
- MacOS
- Linux
Platform:
- iOS
- Android
Output of node -v && npm -v && npm ls --prod --depth=0
v6.12.1
3.10.10
MyReactNativeApp@0.0.1 /Users/dengwanc/Projects/maimai_react_native
├── immutable@3.8.1
├── moment-mini@2.18.1
├── prop-types@15.5.10
├── query-string@5.0.0
├── react@16.0.0-alpha.12
├── react-native@0.47.1
├── react-native-iphone-x-helper@1.0.1
├── react-native-linear-gradient@2.2.0
├── react-native-popup-menu@0.8.0
├── react-native-sentry@0.32.1
├── react-redux@5.0.5
├── redux@3.7.2
├── redux-actions@2.2.1
├── redux-batched-actions@0.1.6
└── underscore@1.8.3
Config:
Sentry.config("http://user:pwd@some-sentry.com//18", {
release: '2da95dfb052f477380608d59d32b4ab9',
}).install();
I have following issue:
react native sentry source map JUST not working !!!
my upload script
sentry-cli --auth-token 27d37b4efd73439d820fgcdzaowanmiewang1f84ed1949148137c3fb9a3 \
--url http://some-sentry.com \
releases -o sentry -p react-native files \
2da95dfb052f477380kk8d59d32b4ab9 upload-sourcemaps \
--rewrite --validate main.jsbundle.map
I GOT THIS IN Senry UI ,I am SO confused NOW
Source code was not found for app:///main.jsbundle
{
"url": "app:///main.jsbundle"
}
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 23 (11 by maintainers)
I followed the instructions carefully (including the code push part): https://docs.sentry.io/clients/react-native/
And I still can’t get the line numbers and source code to be shown at the dashboard. I get this error:
Source code was not found for app:///index.bundle
It looks like Sentry is looking for index.bundle, while the artifacts in the release (which was created by Sentry Cli with code push command) looks like this:
~/main.jsbundle ~/main.jsbundle.map
@anandprabhu Your uploaded source map should do this correctly. Keep in mind, old events will not get symbolicated only new ones. Release and Dist have to match your artifacts. Also, there is a bug in react-native itself facebook is aware of that line number may be wrong for android builds ref: https://github.com/getsentry/react-native-sentry/issues/258 https://github.com/bugsnag/bugsnag-react-native/issues/142 https://github.com/facebook/react-native/issues/6946
I am closing this issue now since it’s already hard to follow. If anyone still having an issue with this, please consider creating a new issue with a reproducible case. It seems like the issue is the linking process of react-native where it’s not able to patch MainApplication.java.
@yaronlevi Can you link an event here? The version and dist of the release in Sentry must match the version and dist on the event itself. But in general this looks correct, would need to link to give a better answer.