Sentry-react-native: [Android][ReleaseApk] Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED

Created on 23 Aug 2019  路  19Comments  路  Source: getsentry/sentry-react-native

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",

Most helpful comment

ah now this is happening to me to

All 19 comments

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

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/

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

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

ah now this is happening to me to

Any update on this?

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. :-)

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

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

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

I have the same issue on 1.3.1

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.

> 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)

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

same issue here

same issue

Same issue here using version 1.6.3

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

Was this page helpful?
0 / 5 - 0 ratings