Description
React Native version: 0.60.3
Steps To Reproduce
react-native init test
cd test/android
- Make sure you have these default settings:
project.ext.react = [
entryFile: "index.js",
enableHermes: false, // clean and rebuild if changing
]
./gradlew assembleRelease --stacktrace
- Check content of
android/app/build/generated/assets/react/release/index.android.bundle
- Check last line, content is:
//# sourceMappingURL=index.android.bundle.packager.map
Expected:
//# sourceMappingURL=index.android.bundle.map
So the problem with this is at least twofold.
First I think if hermes
is not enabled it shouldn't mess with the --sourcemap-output
parameter at all. Reason why this came up is this: getsentry/sentry-react-native#612 (comment)
Hermes apparently needs an intermediate path and messes with this arg which breaks our setup.
At Sentry we try to pick up on this arg to determine the location but, this is not the real location since you move the file there later, see:
Lines 172 to 175 in 0190c9c
(Same for bundle)
And also, if the reference on the bottom of the file is not correct we cannot load it correctly.
I am not sure how to solve this since just copying instead of moving really doesn't.
If hermes is enabled it seems to work correctly, I am not sure why the source maps and bundle need to go in the intermediate folder tho.
If you know a way how to fix it, I would provide a PR for it.