Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build failing on CI; Execution failed for task ':app:bundle...JsAndAssets_SentryUpload'. #553

Closed
2 of 5 tasks
ricbermo opened this issue Feb 26, 2019 · 10 comments
Closed
2 of 5 tasks

Comments

@ricbermo
Copy link

ricbermo commented Feb 26, 2019

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

Output of node -v && npm -v && npm ls --prod --depth=0

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:

  • It should work since locally is working.
@abunsen
Copy link

abunsen commented Mar 4, 2019

We're also having the same issue:

> Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
error: An organization slug is required (provide with --org)

@abunsen
Copy link

abunsen commented Mar 4, 2019

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.

@Martian2Lee
Copy link

Check if you forgot to put sentry.properties under ios and android folder.

@jacquesdev
Copy link

I removed the line cli.executable=node_modules/@sentry/cli/bin/sentry-cli in android/sentry.properties and it seemed to fix the issue.

@LiuC520
Copy link

LiuC520 commented Mar 25, 2019

me too,I hit the issue for {Android build failing on CI; Execution failed for task ':app:bundle...JsAndAssets_SentryUpload'}.

@andreysaleba
Copy link

@abunsen did you find a solution? I have the same problem.

@ricbermo
Copy link
Author

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.

@pradhul
Copy link

pradhul commented Mar 28, 2019

Facing the same issue Comment link : #273 (comment)

@HazAT
Copy link
Member

HazAT commented Sep 4, 2019

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.

@HazAT HazAT closed this as completed Sep 4, 2019
@regalstreak
Copy link

regalstreak commented Jul 4, 2020

You can use a postinstall patch for now #823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants