In short: why index.android.bundle
is not uploaded to Sentry server following expo's guide
I made a GitHub issue as I tested this with a clean repository. And there I specified the issue better and with more detail. The main problem could be the script I'm using. I will link the issue here: https://github.com/expo/sentry-expo/issues/313
Hello.
I'm using the latest sentry-expo
which correctly sends errors to sentry server.
I have followed the documentation from https://docs.expo.dev/guides/using-sentry/#uploading-source-maps-for-updates
On new builds index.android.bundle
and .map
is uploaded to sentry.
But when I make an update running eas update
and following the sentry-cli releases...
script as documented in expo guide, the android-'hash'.map
file is uploaded and index.android.bundle
is not.
Therefore dist is different between .js
and .map
file and Sentry issues don't contain source map information:
Source code was not found (see Troubleshooting for JavaScript)
Url app:///index.android.bundle
But if I change index.android.bundle
to index.android.bundle.js
in Sentry-cli --rewrite command the bundle is uploaded but issues still show the same information probably due to that android Archive is ~/index.android.bundle.js
but the issue is expecting ~/index.android.bundle
.
package versions:
"@sentry/react-native": "4.9.0",
"expo": "~47.0.8",
"sentry-expo": "~6.0.0",
I add here that I'm on Windows and couldn't get sentry-cli release to work as it is documented in expo-sentry tutorial. I used this script
cross-env ./node_modules/@sentry/cli/bin/sentry-cli releases --org 'organization name' --project 'project name' files 'release name' upload-sourcemaps --dist 'Android Update ID' --rewrite dist/bundles/index.android.bundle dist/bundles/android-'hash'.map
Thank you for all the help!
Android*.js file simply needed to be changed to index.android.bundle not to index.android.bundle.js. Now source maps are showing correctly.
Expo documentation showed everything correctly but my own understanding added the need of .js in file naming. Bundle file without any extension works correctly