sentry-react-native: Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

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

v11.9.0
6.8.0
FixApp@0.0.1 /Users/aerik/Documents/DevelopmentProjects/FixApp
├── axios@0.18.0
├── prop-types@15.6.2
├── react@16.6.3
├── react-native@0.58.3
├── react-native-config@0.11.7
├── react-native-fbsdk@0.8.0
├── react-native-firebase@5.3.1
├── react-native-gesture-handler@1.0.15
├── react-native-image-crop-picker@0.24.0
├── react-native-image-zoom-viewer@2.2.25
├── react-native-keyboard-aware-scroll-view@0.8.0
├── react-native-material-textfield@0.12.0
├── react-native-modal@9.0.0
├── react-native-sentry@0.42.0
├── react-native-signature-capture@0.4.9
├── react-native-sound@0.10.12
├── react-native-splash-screen@3.2.0
├── react-native-status-bar-height@2.3.1
├── UNMET PEER DEPENDENCY react-native-svg@9.2.4
├── react-native-svg-uri@1.2.3
├── react-native-swiper@1.5.14
├── react-navigation@3.1.5
├── react-redux@6.0.0
├── redux@4.0.1
└── redux-thunk@2.3.0

Config:

Sentry.config('https://...@sentry.io/...', {
....
}).install()

I have following issue:

  • when running ./gradlew assembleRelease

Actual result:

Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
Task ':app:bundleReleaseJsAndAssets_SentryUpload' is not up-to-date because:
  Task has not declared any outputs despite executing actions.
Starting process 'command 'node_modules/@sentry/cli/bin/sentry-cli''. Working directory: /Users/aerik/Documents/DevelopmentProjects/FixApp Command: node_modules/@sentry/cli/bin/sentry-cli react-native gradle --bundle /Users/aerik/Documents/DevelopmentProjects/FixApp/android/app/build/generated/assets/react/release/index.android.bundle --sourcemap /Users/aerik/Documents/DevelopmentProjects/FixApp/android/app/build/generated/assets/react/release/index.android.bundle.map --release com.fixapp-1.0 --dist 1
Successfully started process 'command 'node_modules/@sentry/cli/bin/sentry-cli''
Processing react-native sourcemaps for Sentry upload.
> Analyzing 2 sources
> Rewriting sources
> Adding source map references
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.
:app:bundleReleaseJsAndAssets_SentryUpload (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 1.142 secs.

FAILURE: Build failed with an exception.

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 44
  • Comments: 23

Most upvoted comments

This happened to me after changing the project name in the Sentry dashboard.

If you do this, you’d also have to change the name in the following files: ./android/sentry.properties and ./ios/sentry.properties

In my case, the problem occured when I wanted to make staging builds. I used to just run a react-native bundle command before the assembleStaging but sentry could not find the bundle. I fixed it by editing app/build.gradle

project.ext.react = [
        entryFile: "index.js",
        bundleInStaging: true,       // Add this
        bundleInInternalTest: true,  // Add this
        bundleInRelease: true
 
]

+1

Any update? I have the same issue when I try to make a build

Any news here? I am experiencing it as well.

Its been 6 months please anything? 🙏

haven’t been able to build an android release in several weeks (since updating to @sentry/react-native)

node: v12.10.0 npm: 6.10.3 sentry: 1.0.4 react-native: 0.60.5

> Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED
  INFO    2019-09-11 18:17:49.306227 -07:00 Loaded config from /Users/bneigher/.sentryclirc
  DEBUG   2019-09-11 18:17:49.308590 -07:00 sentry-cli version: 1.47.1, platform: "darwin", architecture: "x86_64"
  INFO    2019-09-11 18:17:49.308615 -07:00 sentry-cli was invoked with the following command line: "/Users/bneigher/Desktop/project/node_modules/@sentry/cli/sentry-cli" "react-native" "gradle" "--bundle" "/Users/bneigher/Desktop/project/android/app/build/generated/assets/react/release/index.android.bundle" "--sourcemap" "/Users/bneigher/Desktop/project/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map" "--release" "com.project-1.11.6" "--dist" "91"
Processing react-native sourcemaps for Sentry upload.
  INFO    2019-09-11 18:17:49.312151 -07:00   bundle path: /Users/bneigher/Desktop/project/android/app/build/generated/assets/react/release/index.android.bundle
  INFO    2019-09-11 18:17:49.312184 -07:00   sourcemap path: /Users/bneigher/Desktop/project/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
  DEBUG   2019-09-11 18:17:49.313058 -07:00 Non-file bundle found
> Analyzing 2 sources
  DEBUG   2019-09-11 18:17:49.315640 -07:00 error: running update nagger
  DEBUG   2019-09-11 18:17:49.315899 -07:00 skipping update nagger because session is not attended
error: No such file or directory (os error 2)
  DEBUG   2019-09-11 18:17:49.319495 -07:00 client close; no transport to shut down  (from sentry)

seems that /Users/bneigher/Desktop/project/android/app/build/generated/sourcemaps folder is not getting generated

For me error occurred because I had cli.executable=node_modules/@sentry/react-native/node_modules/@sentry/cli/bin/sentry-cli (incorrect path) instead of cli.executable=node_modules/@sentry/cli/bin/sentry-cli in android/sentry.propetries. It looks like it happened when upgrading from react-native-sentry and running yarn sentry-wizard -i reactNative -p ios android (mentioned here https://github.com/getsentry/sentry-react-native/issues/222#issuecomment-562176437)