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][ReleaseApk] Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED #641

Closed
yelkamel opened this issue Aug 23, 2019 · 19 comments
Closed

Comments

@yelkamel
Copy link

yelkamel commented Aug 23, 2019

It's work on iOS and Android Debug version but I can generate Release apk.
I got this error:

I have these following error:

`

Configure project :app
WARNING: The onesignal-gradle-plugin MUST be before com.android.application!
Please put onesignal-gradle-plugin first OR update to com.android.tools.build:gradle:3.0.0 or newer!
Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
Processing react-native sourcemaps for Sentry upload.
Analyzing 2 sources
error: No such file or directory (os error 2)
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:bundleReleaseJsAndAssets_SentryUpload'.
Process 'command '/Users/yelkamel/Technique/EvoTest/node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
`

I try different cli.executable path in sentry.properties but no succes

EDIT:
actually on iOS I got this message:
`

Found 1 debug information file
Prepared debug information file for upload
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.
`

react 16.8.6
react-native 0.60.3
sentry-cli 1.47.1
react-native-sentry "^0.43.2",

@lucasfalcaoo
Copy link

I'm having the same issue, could someone please tell us a solution?

@radik
Copy link

radik commented Aug 25, 2019

I found a reason, but not sure how to solve it:

"react-native": "0.60.3",
"@sentry/react-native": "1.0.0-beta.7",

As I understood, sentry.gradle patches bundleReleaseJsAndAssets task and gets sourcemap output file path from "--sourcemap-output" param of that task. But in the end of react.gradle we have:

doLast {
    ant.move(
        file: jsPackagerSourceMapFile,
        tofile: jsOutputSourceMapFile
    );
}

Where:

def jsPackagerSourceMapFile = file("$jsSourceMapsDir/${bundleAssetName}.packager.map")
def jsOutputSourceMapFile = file("$jsBundleDir/${bundleAssetName}.map")

bundleReleaseJsAndAssets_SentryUpload task failse because it could not find the sourcemap output file.

The only way that I see at the moment - remove following line from your app/build.gradle:

apply from: "../../node_modules/@sentry/react-native/sentry.gradle"

And upload it manually aas described in https://docs.sentry.io/clients/react-native/sourcemaps/

@Grohden
Copy link

Grohden commented Aug 28, 2019

I've got this after splitting my index file, from index.js to index.ios.js and index.android.js

@yelkamel
Copy link
Author

yelkamel commented Aug 29, 2019

Any other idea than upload it manually ? I don't want to do that :/
I'm thinking about removing sentry...

@bneigher
Copy link

ah now this is happening to me to

@asleepace
Copy link

Any update on this?

@JongtaekChoi
Copy link

As @radik said, the following code is the problem.

doLast {
    ant.move(
        file: jsPackagerSourceMapFile,
        tofile: jsOutputSourceMapFile
    );
}

I checked that the above code was deleted from the react-native version of 0.60.4 and was able to build normally after posting the reactive version. No other configuration changes are required when upgrading from 0.60.3 to 0.60.4. :-)

@HazAT
Copy link
Member

HazAT commented Feb 12, 2020

Please consider upgrading to 1.3.0 we fixed many issues there if this is still a problem feel free to post again.

@HazAT HazAT closed this as completed Feb 12, 2020
@shpetimselaci
Copy link

shpetimselaci commented Feb 12, 2020

@HazAT I'm experiencing this issue at the moment using 1.3.0? Should I manually upload the files till this is fixed?

@HazAT
Copy link
Member

HazAT commented Feb 13, 2020

@shpetimselaci Are you experiencing exactly this issue?
Or why is app:bundleReleaseJsAndAssets_SentryUpload failing for you?

@xwartz
Copy link

xwartz commented Feb 20, 2020

I have the same issue on 1.3.1

@HazAT
Copy link
Member

HazAT commented Feb 20, 2020

Please post your complete log with SENTRY_LOG_LEVEL=debug exported.
I have the same issue that is not super helpful and it's hard to provide any help.

@xwartz
Copy link

xwartz commented Feb 20, 2020

> Task :app:bundleDirectReleaseJsAndAssets_SentryUpload FAILED
  INFO    2020-02-20 18:07:48.728620 +08:00 Loaded config from /Users/xwartz/.sentryclirc
  INFO    2020-02-20 18:07:48.730701 +08:00 sentry-cli was invoked with the following command line: "/Users/xwartz/work/consenlabs/token-v2/node_modules/@sentry/cli/sentry-cli" "react-native" "gradle" "--bundle" "/Users/xwartz/work/consenlabs/token-v2/android/app/build/generated/assets/react/direct/release/index.android.bundle" "--sourcemap" "/Users/xwartz/work/consenlabs/token-v2/android/app/build/generated/sourcemaps/react/direct/release/index.android.bundle.map" "--release" "[email protected]+767" "--dist" "767"
Processing react-native sourcemaps for Sentry upload.
  INFO    2020-02-20 18:07:48.736093 +08:00   bundle path: /Users/xwartz/work/token-v2/android/app/build/generated/assets/react/direct/release/index.android.bundle
  INFO    2020-02-20 18:07:48.736136 +08:00   sourcemap path: /Users/xwartz/work/token-v2/android/app/build/generated/sourcemaps/react/direct/release/index.android.bundle.map
> Analyzing 2 sources
error: No such file or directory (os error 2)

@xwartz
Copy link

xwartz commented Feb 20, 2020

the /Users/xwartz/work/token-v2/android/app/build/generated/sourcemaps folder is not getting generated

@xwartz
Copy link

xwartz commented Feb 20, 2020

the same issue #772

@mouhanad-alaskari
Copy link

same issue here

@waqaramjad
Copy link

same issue

@ubmit
Copy link

ubmit commented Aug 3, 2020

Same issue here using version 1.6.3

@mayckondf
Copy link

I was with this bug and I don't was remembering but I was changed the org on the Sentry and on my sentry.properties it was outdated and when I update it fixed the bug

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

No branches or pull requests