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

[ci/cd Android generate release aPK] Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload_15'. 731> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 236 #1401

Closed
ghadeeraqraa1992 opened this issue Mar 15, 2021 · 30 comments

Comments

@ghadeeraqraa1992
Copy link

Environment

sentry.io

Which SDK and version?
@sentry/react-native": "^2.2.1
"react-native": "0.63.4"

Steps to Reproduce

  1. run ci/cd

Expected Result

no issues with sentry

Actual Result

Task :app:bundleReleaseJsAndAssets_SentryUpload_15 FAILED
726error: sentry-cli was not installed by @sentry/cli install script
727> Task :app:bundleReleaseJsAndAssets_SentryUploadCleanUp SKIPPED
728FAILURE: Build failed with an exception.
729* What went wrong:
730Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload_15'.
731> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 236

@lorenzoangelini
Copy link

i have the same error with react native 0.64

@jennmueng
Copy link
Member

Investigating.

@ghadeeraqraa1992
Copy link
Author

any update on this?

@nkpatnis
Copy link

nkpatnis commented Mar 23, 2021

not able to build, debug working but staging/release not.

> Task :app:bundleReleaseStagingJsAndAssets_SentryUpload_20108 FAILED
error: sentry-cli was not installed by @sentry/cli install script

> Task :app:bundleReleaseStagingJsAndAssets_SentryUploadCleanUp SKIPPED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseStagingJsAndAssets_SentryUpload_20108'.
> Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 236

@jennmueng
Copy link
Member

I cannot reproduce this, I will bring up this issue with the team working on the cli

@lorenzoangelini
Copy link

@jennmueng any news? we cannot use the last react native's version with this issue

@ghadeeraqraa1992
Copy link
Author

any update on this ?

@FaggioniHQ
Copy link

FaggioniHQ commented Apr 12, 2021

Any update?... Or at least a workaround?... Thanks in advance.

Im getting this error

* Where: Script '....\node_modules\@sentry\react-native\sentry.gradle' line: 72

* What went wrong: Cannot add task 'bundleReleaseJsAndAssets_SentryUpload_292' as a task with that name already exists.

@jennmueng
Copy link
Member

Any update?... Or at least a workaround?... Thanks in advance.

Im getting this error

* Where: Script '....\node_modules\@sentry\react-native\sentry.gradle' line: 72

* What went wrong: Cannot add task 'bundleReleaseJsAndAssets_SentryUpload_292' as a task with that name already exists.

This error looks unrelated to the issue at hand, which is regarding the Sentry CLI, this seems to be related to the task names? #1390 (comment)

@jennmueng
Copy link
Member

For the issue at hand, can everyone try installing sentry cli as a direct dependency?

npm install -s @sentry/cli
yarn add @sentry/cli

And let me know if this solves the issue?

@JustinRohweller
Copy link

JustinRohweller commented Apr 15, 2021

I get nearly the same error with @sentry/cli installed

@JustinRohweller
Copy link

`error: sentry-cli was not installed by @sentry/cli install script

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload_4'.

Process 'command 'cmd'' finished with non-zero exit value -20`

@JustinRohweller
Copy link

JustinRohweller commented Apr 16, 2021

Hey guys, for anyone still trying to solve it, having @sentry/cli may or may not have helped but I had that and I deleted android/build folder and android/app/build folder as per this comment: #671 (comment) and was able to create a build.

@FaggioniHQ
Copy link

FaggioniHQ commented Apr 16, 2021

I got the issue when trying to upgrade react-native to the latest version. I solved the issue by changing accordingly the variant code generation part.

applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // https://developer.android.com/studio/build/configure-apk-splits.html
            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
               // used on RN 0.61
                output.versionCodeOverride = (versionCodes.get(abi) * 1048576) + defaultConfig.versionCode
               // suggested by RN 0.64
                //defaultConfig.versionCode * 1000 + versionCodes.get(abi)
            }
        }
}

Hope it helps

@ShivamJoker
Copy link

ShivamJoker commented May 8, 2021

@jennmueng even after installing cli directly still it's not working.
Already tried deleting build folders
Can anyone tell me any temporary fix for this ?

@ShivamJoker
Copy link

Getting project not found

DEBUG   2021-05-08 14:35:58.465168 +05:30 Non-file bundle found
  DEBUG   2021-05-08 14:35:58.961900 +05:30 request POST https://sentry.io/api/0/projects/creativeje/creativeje/releases/
  DEBUG   2021-05-08 14:35:58.961935 +05:30 using token authentication
  DEBUG   2021-05-08 14:35:58.961955 +05:30 json body: {"version":"com.sql_playground@2.5.2+22","projects":["creativeje"]}
  DEBUG   2021-05-08 14:35:58.961969 +05:30 retry number 0, max retries: 0
  DEBUG   2021-05-08 14:36:00.299207 +05:30 > POST /api/0/projects/creativeje/creativeje/releases/ HTTP/1.1
  DEBUG   2021-05-08 14:36:00.299242 +05:30 > Host: sentry.io
  DEBUG   2021-05-08 14:36:00.299253 +05:30 > Accept: */*
  DEBUG   2021-05-08 14:36:00.299263 +05:30 > Connection: TE
  DEBUG   2021-05-08 14:36:00.299272 +05:30 > TE: gzip
  DEBUG   2021-05-08 14:36:00.299280 +05:30 > User-Agent: sentry-cli/1.64.1
  DEBUG   2021-05-08 14:36:00.299928 +05:30 > Authorization: Bearer be710333***
  DEBUG   2021-05-08 14:36:00.299943 +05:30 > Content-Type: application/json
  DEBUG   2021-05-08 14:36:00.299953 +05:30 > Content-Length: 67
  DEBUG   2021-05-08 14:36:01.014956 +05:30 < HTTP/1.1 302 Found
  DEBUG   2021-05-08 14:36:01.014979 +05:30 < Server: nginx
  DEBUG   2021-05-08 14:36:01.014988 +05:30 < Date: Sat, 08 May 2021 09:06:01 GMT
  DEBUG   2021-05-08 14:36:01.015001 +05:30 < Content-Type: application/json
  DEBUG   2021-05-08 14:36:01.015020 +05:30 < Content-Length: 172
  DEBUG   2021-05-08 14:36:01.015027 +05:30 < Connection: keep-alive
  DEBUG   2021-05-08 14:36:01.015033 +05:30 < location: /api/0/projects/creativeje/sql-play/releases/
  DEBUG   2021-05-08 14:36:01.015039 +05:30 < allow: GET, POST, HEAD, OPTIONS
  DEBUG   2021-05-08 14:36:01.015045 +05:30 < access-control-allow-methods: GET, POST, HEAD, OPTIONS
  DEBUG   2021-05-08 14:36:01.015058 +05:30 < access-control-allow-headers: X-Sentry-Auth, X-Requested-With, Origin, Accept, Content-Type, Authentication, Authorization, Content-Encoding
  DEBUG   2021-05-08 14:36:01.015064 +05:30 < access-control-expose-headers: X-Sentry-Error, Retry-After
  DEBUG   2021-05-08 14:36:01.015070 +05:30 < access-control-allow-origin: *
  DEBUG   2021-05-08 14:36:01.015075 +05:30 < vary: Accept-Language, Cookie
  DEBUG   2021-05-08 14:36:01.015081 +05:30 < content-language: en
  DEBUG   2021-05-08 14:36:01.015086 +05:30 < x-frame-options: deny
  DEBUG   2021-05-08 14:36:01.015091 +05:30 < x-content-type-options: nosniff
  DEBUG   2021-05-08 14:36:01.015099 +05:30 < x-xss-protection: 1; mode=block
  DEBUG   2021-05-08 14:36:01.015105 +05:30 < x-envoy-attempt-count: 1
  DEBUG   2021-05-08 14:36:01.015110 +05:30 < x-envoy-upstream-service-time: 39
  DEBUG   2021-05-08 14:36:01.015115 +05:30 < x-served-by: getsentry-web-default-production-74cb55cf5d-gg6vj
  DEBUG   2021-05-08 14:36:01.015121 +05:30 < x-served-by: lb-48
  DEBUG   2021-05-08 14:36:01.015126 +05:30 < Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
  DEBUG   2021-05-08 14:36:01.015173 +05:30 response status: 302
  DEBUG   2021-05-08 14:36:01.015195 +05:30 body: {"slug":"sql-play","detail":{"code":"resource-moved","message":"Resource has been moved","extra":{"url":"/api/0/projects/creativeje/sql-play/releases/","slug":"sql-play"}}}
error: project not found
  DEBUG   2021-05-08 14:36:01.016444 +05:30 client close; no transport to shut down  (from sentry)
  DEBUG   2021-05-08 14:36:01.016465 +05:30 skipping update nagger because session is not attended

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload_22'.
> Process 'command '/Users/shivam/Documents/ReactNative/SQL-Playground/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1

@ShivamJoker
Copy link

Okay so the issue was with - in my project name I removed it and linked again now it seems to work

@KingAmo
Copy link

KingAmo commented May 14, 2021

any help please?
image
project not found

"***/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1

@ghadeeraqraa1992
Copy link
Author

any update on this ?

@KingAmo
Copy link

KingAmo commented May 17, 2021

run

npx @sentry/wizard -i reactNative -p ios android

solved my problem

@ghadeeraqraa1992
Copy link
Author

run

npx @sentry/wizard -i reactNative -p ios android

solved my problem

could you please explain more
where you run it ?
should I add it to yml file ?

@KingAmo
Copy link

KingAmo commented May 17, 2021

run it in your terminal

@ghadeeraqraa1992
Copy link
Author

it is working with me after adding

  • npm install @sentry/cli #Install sentry CLI
    inside .yml file

@freemile2ru
Copy link

I have tried everything listed here and its still not working. RN 0.60

@chaimPaneth
Copy link

chaimPaneth commented Jul 11, 2021

Hi @KingAmo

I got the project not found error, in my case the issue was that we host sentry on our own servers and the @sentry/wizard command exported our domain without the s for secure protocol http to the sentry.properties file for defaults.url=http://... parameter and that caused the cli to not find our project as the cli query to get info about the project got denied by our servers. Once I changed the domain to https it worked.

So in my case changing in sentry.properties:

  • defaults.url=http... to defaults.url=https with the s

Did the trick.

@marandaneto
Copy link
Contributor

@jennmueng do you know if we should do something about it?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2021

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@marandaneto
Copy link
Contributor

Closing the issue as a part of large repository cleanup, due to it being inactive and/or outdated. There's a large chance that this issue has been solved since.
Please do not hesitate to ping me if it is still relevant, and I will happily reopen and work on it.
Cheers!

@yorickshan
Copy link

For the issue at hand, can everyone try installing sentry cli as a direct dependency?

npm install -s @sentry/cli
yarn add @sentry/cli
And let me know if this solves the issue?

thx, this works for me.

@SKempin
Copy link

SKempin commented Sep 26, 2024

Was getting this error with EAS builds on Android (iOS was fine). Needed to add the sentry auth token as an EAS secret. That fixed it for me.

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