Hello
Source map shows correctly after initial build. But after first update the source code doesn't work anymore. It seems the source map is being updated with the new dist (Cli commad and --dist specified in sentry-expo docs; Using Sentry - Expo Documentation) but the bundle file is not updated with corresponding dist. With understanding this results source code to be missing in events that come from updated apps. After the script I see .map file is uploaded but the new .build file is not being found and thus not being uploaded.
Below is an image of sentry artifacts where at the top is .map uploaded after eas update and down are .bundle and .map files from build.
Because I didn't get script working from Using Sentry docs out of the box I used this little modified script with filled values:
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
With my understanding the script above should work, but it doesn't recognize .bundle file without the full name with extension. Is this due the usage of "cross env"?
Nevertheless the script works with .js extension (dist/bundles/index.android.bundle > dist/bundles/index.android.bundle.js) and it uploads the .bundle file as shown in the below image.
But then on Sentry release artifact name is ~/index.android.bundle.js. And Sentry throws the following error shown in the below image (If I understood correctly the problem is because of that artifact naming. Dist and release are correct in the event).
Thank you and thank you for this package!
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
Reproducible demo or steps to reproduce from a blank project
This minimal repository is made by krystofwoldrich and I used it to test described behavior. Repository step by step (in the commits) adds sentry-expo into a new expo project. Only thing I added in addition to the repository in my testing was "jsEngine": "hermes" to app.json, which can be seen from 0B index.android.bundle artifact.
Summary
Hello
Source map shows correctly after initial build. But after first update the source code doesn't work anymore. It seems the source map is being updated with the new dist (Cli commad and --dist specified in sentry-expo docs; Using Sentry - Expo Documentation) but the bundle file is not updated with corresponding dist. With understanding this results source code to be missing in events that come from updated apps. After the script I see .map file is uploaded but the new .build file is not being found and thus not being uploaded.
Below is an image of sentry artifacts where at the top is .map uploaded after eas update and down are .bundle and .map files from build.![Sieppaa](https://user-images.githubusercontent.com/65889813/212670676-919145b7-33d7-4d0f-bd90-ab6153016fbe.PNG)
Because I didn't get script working from Using Sentry docs out of the box I used this little modified script with filled values:
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
With my understanding the script above should work, but it doesn't recognize .bundle file without the full name with extension. Is this due the usage of "cross env"? Nevertheless the script works with .js extension (![213417420-d9289783-c76b-4721-9d8d-eb0bb88c7854](https://user-images.githubusercontent.com/65889813/213978396-f0134ea1-b9e8-43c8-9cb7-67b6eef12208.png)
dist/bundles/index.android.bundle
>dist/bundles/index.android.bundle.js
) and it uploads the .bundle file as shown in the below image.But then on Sentry release artifact name is ~/index.android.bundle.js. And Sentry throws the following error shown in the below image (If I understood correctly the problem is because of that artifact naming. Dist and release are correct in the event).![213692280-59cfb2e0-5398-4ff2-896c-04dde74f7baf](https://user-images.githubusercontent.com/65889813/213978696-da2d8a17-8026-49f8-b980-41ef3c415e87.png)
Thank you and thank you for this package!
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
47
Environment
expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.19045 Binaries: Node: 16.18.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD npmPackages: expo: ~47.0.8 => 47.0.8 react: 18.1.0 => 18.1.0 react-native: 0.70.5 => 0.70.5 Expo Workflow: managed
Reproducible demo or steps to reproduce from a blank project
This minimal repository is made by krystofwoldrich and I used it to test described behavior. Repository step by step (in the commits) adds sentry-expo into a new expo project. Only thing I added in addition to the repository in my testing was "jsEngine": "hermes" to app.json, which can be seen from 0B index.android.bundle artifact.
Repo: https://github.com/krystofwoldrich/sentry-expo-sample-app