OS:
_Platform:_
Output of node -v && npm -v && npm ls --prod --depth=0
v11.9.0
6.5.0
[email protected]
[email protected]
[email protected]
Config:
Sentry.config('https://[email protected]/...'}).install()
I have following issue:
All of my gradlew assemble tasks are working perfectly locally. The issue is when I try to build my project on both AppCenter and Bitrise.
Steps to reproduce:
- Step
1. Build the app on CI.
Actual result:
bundle: Done copying assets
:app:bundleReleaseStagingJsAndAssets_SentryUpload INFO 2019-02-26 14:16:08.133488 -08:00 Loaded config from /Users/vagrant/.sentryclirc
DEBUG 2019-02-26 14:16:08.134580 -08:00 sentry-cli version: 1.40.0, platform: "darwin", architecture: "x86_64"
INFO 2019-02-26 14:16:08.134613 -08:00 sentry-cli was invoked with the following command line: "/Users/vagrant/git/node_modules/@sentry/cli/sentry-cli" "--log-level" "debug" "react-native" "gradle" "--bundle" "/Users/vagrant/git/android/app/build/generated/assets/react/releaseStaging/index.android.bundle" "--sourcemap" "/Users/vagrant/git/android/app/build/generated/assets/react/releaseStaging/index.android.bundle.map" "--release" "com.[REDACTED].mobile-1.0" "--dist" "1"
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
INFO 2019-02-26 14:16:08.137934 -08:00 bundle path: /Users/vagrant/git/android/app/build/generated/assets/react/releaseStaging/index.android.bundle
INFO 2019-02-26 14:16:08.137962 -08:00 sourcemap path: /Users/vagrant/git/android/app/build/generated/assets/react/releaseStaging/index.android.bundle.map
> Rewriting sources
> Adding source map references
DEBUG 2019-02-26 14:16:09.266359 -08:00 error: running update nagger
DEBUG 2019-02-26 14:16:09.266459 -08:00 skipping update nagger because session is not attended
error: request failed because API URL was incorrectly formatted
caused by: bad sentry url: not on URL root ([REDACTED])
DEBUG 2019-02-26 14:16:09.267265 -08:00 client close; no transport to shut down (from sentry)
:app:bundleReleaseStagingJsAndAssets_SentryUpload FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseStagingJsAndAssets_SentryUpload'.
> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
and on AppCenter
:app:bundleReleaseStagingJsAndAssets_SentryUpload INFO 2019-02-26 22:09:14.417166 +00:00 Loaded config from /Users/vsts/.sentryclirc
DEBUG 2019-02-26 22:09:14.417984 +00:00 sentry-cli version: 1.37.2, platform: "darwin", architecture: "x86_64"
INFO 2019-02-26 22:09:14.418016 +00:00 sentry-cli was invoked with the following command line: "/Users/vsts/agent/2.147.1/work/1/s/node_modules/@sentry/cli/sentry-cli" "--log-level" "debug" "react-native" "gradle" "--bundle" "/Users/vsts/agent/2.147.1/work/1/s/android/app/build/generated/assets/react/releaseStaging/index.android.bundle" "--sourcemap" "/Users/vsts/agent/2.147.1/work/1/s/android/app/build/generated/assets/react/releaseStaging/index.android.bundle.map" "--release" "com.***.mobile-1.0" "--dist" "1"
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
INFO 2019-02-26 22:09:14.420814 +00:00 bundle path: /Users/vsts/agent/2.147.1/work/1/s/android/app/build/generated/assets/react/releaseStaging/index.android.bundle
INFO 2019-02-26 22:09:14.420836 +00:00 sourcemap path: /Users/vsts/agent/2.147.1/work/1/s/android/app/build/generated/assets/react/releaseStaging/index.android.bundle.map
> Rewriting sources
> Adding source map references
DEBUG 2019-02-26 22:09:15.216050 +00:00 error: running update nagger
DEBUG 2019-02-26 22:09:15.216097 +00:00 skipping update nagger because session is not attended
error: request failed because API URL was incorrectly formatted
caused by: bad sentry url: not on URL root (SOMETHING_HERE)
DEBUG 2019-02-26 22:09:15.216991 +00:00 client close; no transport to shut down (from sentry)
:app:bundleReleaseStagingJsAndAssets_SentryUpload FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseStagingJsAndAssets_SentryUpload'.
> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
Expected result:
We're also having the same issue:
> Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
error: An organization slug is required (provide with --org)
and on iOS too:
Running script 'Bundle React Native code and images'
An organization slug is required (provide with --org)
with trace on, it looks like the sentry-cli is now requiring a .sentryclirc file.
Check if you forgot to put sentry.properties under ios and android folder.
I removed the line cli.executable=node_modules/@sentry/cli/bin/sentry-cli in android/sentry.properties and it seemed to fix the issue.
me too锛孖 hit the issue for {Android build failing on CI; Execution failed for task ':app:bundle...JsAndAssets_SentryUpload'}.
@abunsen did you find a solution? I have the same problem.
For everyone trying to workaround this issue. I ended up with this
if (System.getenv("APPCENTER_BUILD_SENTRY")) {
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
}
Since I'm only using AppCenter to send OTA updates and to run tests when I open PR it was not a big deal to remove the Sentry stuff. You'd just need to add that APPCENTER_BUILD_SENTRY env. variable in your build settings.
Facing the same issue Comment link : https://github.com/getsentry/react-native-sentry/issues/273#issuecomment-477459934
I am closing all old issues, please if this is still a problem feel free to revive it.
Also, consider moving to our new SDK @sentry/react-native if it still happens there please open a new issue.
You can use a postinstall patch for now https://github.com/getsentry/sentry-react-native/pull/823
Most helpful comment
We're also having the same issue: