feat(core): Add disableAutoUpload option to Expo plugin
#6195
2 issues
find-bugs: Found 2 issues (2 medium)
Medium
`disableAutoUpload: false` does not remove the existing `shouldSentryAutoUploadGeneral` override in Android build.gradle - `packages/core/plugin/src/withSentryAndroid.ts:45-52`
Once disableAutoUpload: true is applied and then changed back to false, re-running prebuild leaves the project.ext.shouldSentryAutoUploadGeneral = { -> return false } line in place, so source map uploads stay disabled indefinitely on Android.
Also found at:
packages/core/plugin/src/withSentryIOS.ts:45-51packages/core/test/expo-plugin/modifyAppBuildGradle.test.ts:60-64
Toggling `disableAutoUpload` from true back to false does not strip the existing `SENTRY_DISABLE_AUTO_UPLOAD=true` export from iOS build phase scripts - `packages/core/plugin/src/withSentryAndroid.ts:45`
In withSentryIOS, once disableAutoUpload: true has injected export SENTRY_DISABLE_AUTO_UPLOAD=true into the 'Bundle React Native code and images' and 'Upload Debug Symbols to Sentry' shell scripts, changing the option back to false and re-running prebuild does not remove that line. iOS source map and dSYM uploads remain silently disabled even though the user opted back in.
Also found at:
packages/core/plugin/src/withSentryIOS.ts:71-75packages/core/test/expo-plugin/modifyXcodeProject.test.ts:138
โฑ 11m 18s ยท 583.5k in / 80.2k out ยท $2.57
Annotations
Check warning on line 52 in packages/core/plugin/src/withSentryAndroid.ts
sentry-warden / warden: find-bugs
`disableAutoUpload: false` does not remove the existing `shouldSentryAutoUploadGeneral` override in Android build.gradle
Once `disableAutoUpload: true` is applied and then changed back to `false`, re-running prebuild leaves the `project.ext.shouldSentryAutoUploadGeneral = { -> return false }` line in place, so source map uploads stay disabled indefinitely on Android.
Check warning on line 51 in packages/core/plugin/src/withSentryIOS.ts
sentry-warden / warden: find-bugs
[VLW-CEC] `disableAutoUpload: false` does not remove the existing `shouldSentryAutoUploadGeneral` override in Android build.gradle (additional location)
Once `disableAutoUpload: true` is applied and then changed back to `false`, re-running prebuild leaves the `project.ext.shouldSentryAutoUploadGeneral = { -> return false }` line in place, so source map uploads stay disabled indefinitely on Android.
Check warning on line 64 in packages/core/test/expo-plugin/modifyAppBuildGradle.test.ts
sentry-warden / warden: find-bugs
[VLW-CEC] `disableAutoUpload: false` does not remove the existing `shouldSentryAutoUploadGeneral` override in Android build.gradle (additional location)
Once `disableAutoUpload: true` is applied and then changed back to `false`, re-running prebuild leaves the `project.ext.shouldSentryAutoUploadGeneral = { -> return false }` line in place, so source map uploads stay disabled indefinitely on Android.
Check warning on line 45 in packages/core/plugin/src/withSentryAndroid.ts
sentry-warden / warden: find-bugs
Toggling `disableAutoUpload` from true back to false does not strip the existing `SENTRY_DISABLE_AUTO_UPLOAD=true` export from iOS build phase scripts
In `withSentryIOS`, once `disableAutoUpload: true` has injected `export SENTRY_DISABLE_AUTO_UPLOAD=true` into the 'Bundle React Native code and images' and 'Upload Debug Symbols to Sentry' shell scripts, changing the option back to `false` and re-running prebuild does not remove that line. iOS source map and dSYM uploads remain silently disabled even though the user opted back in.
Check warning on line 75 in packages/core/plugin/src/withSentryIOS.ts
sentry-warden / warden: find-bugs
[STG-GNU] Toggling `disableAutoUpload` from true back to false does not strip the existing `SENTRY_DISABLE_AUTO_UPLOAD=true` export from iOS build phase scripts (additional location)
In `withSentryIOS`, once `disableAutoUpload: true` has injected `export SENTRY_DISABLE_AUTO_UPLOAD=true` into the 'Bundle React Native code and images' and 'Upload Debug Symbols to Sentry' shell scripts, changing the option back to `false` and re-running prebuild does not remove that line. iOS source map and dSYM uploads remain silently disabled even though the user opted back in.
Check warning on line 138 in packages/core/test/expo-plugin/modifyXcodeProject.test.ts
sentry-warden / warden: find-bugs
[STG-GNU] Toggling `disableAutoUpload` from true back to false does not strip the existing `SENTRY_DISABLE_AUTO_UPLOAD=true` export from iOS build phase scripts (additional location)
In `withSentryIOS`, once `disableAutoUpload: true` has injected `export SENTRY_DISABLE_AUTO_UPLOAD=true` into the 'Bundle React Native code and images' and 'Upload Debug Symbols to Sentry' shell scripts, changing the option back to `false` and re-running prebuild does not remove that line. iOS source map and dSYM uploads remain silently disabled even though the user opted back in.