Bundle file and sourcemap don't get to be uploaded on Sentry through gradle
See original GitHub issueEnvironment
How do you use Sentry?
- sentry.io
Which SDK and version?
- react-native 0.63.4
- @sentry/react-native 2.4.0
- sentry-cli 1.63.2
- fastlane-plugin-sentry 1.8.1
Steps to Reproduce
I set up sentry for react-native following the instructions from the website. In short I have the following:
settings.gradle
include ':@sentry_react-native'
project(':@sentry_react-native').projectDir = new File(rootProject.projectDir, '../node_modules/@sentry/react-native/android')
build.gradle
project.ext.sentryCli = [
logLevel: "debug"
]
...
if (project.env.get("SENTRY_ORG") != "") {
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
}
...
implementation project(':@sentry_react-native')
android/sentry.properties
defaults.url=https://sentry.io/
defaults.org=
defaults.project=
auth.token=
I’m using fastlane on my computer to build and release new app updates. I use the following:
bump_version(type: options[:type])
version = android_get_version_name
build = android_get_version_code
gradle(task: "clean")
# I tried the assemble task (that generates APK) but it does the same
gradle(
task: "bundle",
build_type: "Release",
print_command: false
)
Out of it, I have the following files generated. I believe been triggered by sentry gradle
[07:19:18]: ▸ > Task :app:bundleReleaseJsAndAssets
[07:19:18]: ▸ warning: the transform cache was reset.
[07:19:18]: ▸ Welcome to React Native!
[07:19:18]: ▸ Learn once, write anywhere
[07:19:44]: ▸ info Writing bundle output to:, /path/app/build/generated/assets/react/release/index.android.bundle
[07:19:44]: ▸ info Writing sourcemap output to:, /path/index.map
[07:19:44]: ▸ info Done writing bundle output
[07:19:44]: ▸ info Done writing sourcemap output
[07:19:45]: ▸ info Copying 250 asset files
[07:19:46]: ▸ info Done copying assets
[07:19:46]: ▸ > Task :app:mergeReleaseShaders
[07:19:46]: ▸ > Task :app:compileReleaseShaders NO-SOURCE
[07:19:46]: ▸ > Task :app:generateReleaseAssets UP-TO-DATE
However, I don’t get any app:bundleProductionReleaseJsAndAssets_SentryUpload
following this step. I workaround using the fastlane sentry plugin to create a release and upload bundle and sourcemaps, but I imagine it would work out of the box using the sentry gradle
Expected Result
Bundle file and sourcemap should be uploaded in the gradle step.
Actual Result
Bundle file and sourcemaps are not “automatically” uploaded.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
@kamilogorek @marandaneto Thanks for the wild ride through Sentry repositories, it was fun!
@leonskim That was it! Do you remember why I did add this option? 😄 Probably some copy/paste from StackOverflow to change JVM configurations
@marandaneto I went over this page a couple of times but didn’t pay attention to this, unfortunately. Maybe a warning hint kind-of-style would be more visible. Thanks all for the help 😃