OS:
_Platform:_
> Task :app:bundleDebugJsAndAssets_SentryUpload FAILED
INFO 2019-01-31 15:57:24.025993 +01:00 Loaded config from /Users/brian/.sentryclirc
DEBUG 2019-01-31 15:57:24.027105 +01:00 sentry-cli version: 1.37.4, platform: "darwin", architecture: "x86_64"
INFO 2019-01-31 15:57:24.027133 +01:00 sentry-cli was invoked with the following command line: "/Users/brian/punten-app/node_modules/@sentry/cli/sentry-cli" "--log-level" "debug" "react-native" "gradle" "--bundle" "/Users/brian/punten-app/android/app/build/generated/assets/react/debug/index.android.bundle" "--sourcemap" "/Users/brian/punten-app/android/app/build/generated/assets/react/debug/index.android.bundle.map" "--release" "nl.puntje.business-1.0.8" "--dist" "8"
INFO 2019-01-31 15:57:24.030271 +01:00 bundle path: /Users/brian/punten-app/android/app/build/generated/assets/react/debug/index.android.bundle
INFO 2019-01-31 15:57:24.030290 +01:00 sourcemap path: /Users/brian/punten-app/android/app/build/generated/assets/react/debug/index.android.bundle.map
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
DEBUG 2019-01-31 15:57:24.031403 +01:00 error: running update nagger
DEBUG 2019-01-31 15:57:24.031692 +01:00 skipping update nagger because session is not attended
error: No such file or directory (os error 2)
DEBUG 2019-01-31 15:57:24.037634 +01:00 client close; no transport to shut down (from sentry)
Config:
index.js
Sentry.config('https://[email protected]/...').install()
I have following issue:
I am getting a build error when running react-native run-android
Steps to reproduce:
ask :app:bundleDebugJsAndAssets_SentryUpload FAILED error.Why does it attempt to upload source map for debug build? Can I disable this?
./gradlew assembleRelease works fine.. only going wrong for debug builds.
Adding in build gradle
project.ext.react = [
entryFile: "index.js",
bundleInDebug: true
]
is a workaround...
This might be an issue which could happen when you enabled Use JS deltas feature in dev settings. Disabling might work for you: https://stackoverflow.com/a/50982443
Its seems there is a problem with version 0.41 Downgrading back to 0.40.3 prevents the problem, There was a major refactor to the build.gradle on version 0.41 that probably caused the problem.
Any updates on this issue? please let me know if anyone need help to reproduce.
@HazAT Also I am seeing the upload to Sentry taking a long time compared to the previous versions. Is it something do with the library update or Sentry server issue?
edit "node_modules/react-native-sentry/sentry.gradle"
change
def bundleTasks = tasks.findAll { task -> task.name.startsWith("bundle") && task.name.endsWith("JsAndAssets")}
to
def bundleTasks = tasks.findAll { task -> task.name.startsWith("bundle") && task.name.endsWith("JsAndAssets") && !task.name.contains("Debug")}
Same issue with RN 0.57, setting bundleInDebug: true works but building takes more time
Same here with RN 58.3 and Sentry 41.1
After trying @icfr 's approach i get :app:transformDexArchiveWithExternalLibsDexMergerForDebug
with Program type already present: org.slf4j.IMarkerFactory
Any ideas?
@beardred i think it's another issue ...
possible solution
same here, bundleInDebug: true not works for me, getting the same output
> Task :app:bundleDebugJsAndAssets_SentryUpload
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
error: project not found
Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
Please attach the full debug log to all bug reports.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleDebugJsAndAssets_SentryUpload'.
> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 34s
76 actionable tasks: 2 executed, 74 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
A workaround is to replace in android/app/build.gradle
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
with
if (!getGradle().getStartParameter().getTaskRequests().toString().contains("Debug")) {
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
}
It will skip the upload of JS sources to Sentry only during debug build.
I had to remove Sentry from my project because of this issue. AppCenter fails to build and those workarounds aren't relevant since I guess it doesn't have the debug flag.
Would anyone of you, would be so kind and create a PR with a fix for it?
Thanks!
Most helpful comment
A workaround is to replace in
android/app/build.gradlewith
It will skip the upload of JS sources to Sentry only during debug build.