getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.58k stars 338 forks source link

Task :app:bundleReleaseJsAndAssets_SentryUpload FAILED #578

Closed costerik closed 4 years ago

costerik commented 5 years ago

OS:

Platform:

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:

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
maieonbrix commented 5 years ago

Can you try to cd android/ and then ./gradlew assembleRelease --debug ?

For me this error was due to a 413 status code made by our self hosted sentry. The source maps being uploaded were bigger than our server size limitation. By increasing the 'client_max_body_size to 20mb the error went away.

So check first if this is not related to sourcemaps / server.

That would be nice to have a repro or something as your message is not helping that much.

Hope it will help you.

v-ken commented 5 years ago

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

tobiaseisenschenk commented 5 years ago

@costerik make sure the org and project are match exactly the ones shown in the browser url when you navigate to your project. Also I was mislead because the official docs say the sentry.properties belong in the react-native root, which is wrong.

aldrinc commented 5 years ago

I'm having the same issue and have tried the proposed methods above to no avail.

  1. My project name was never changed (verified the sentry.properties org/project matches with dashboard nonetheless)
  2. I'm not using self-hosted sentry

Will try to provide a repro case shortly.

Genitivo commented 5 years ago

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

skizzo commented 5 years ago

+1

maieonbrix commented 5 years ago

Can someone try to run the build command with the --debug flag and then copy-paste the logs here ? (cd android && ./gradlew assembleRelease --debug)

Thanks to this I was able to know that my problem was source-maps size related when the build process hit the :react-native-sentry dep

Genitivo commented 5 years ago
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :app:bundleReleaseJsAndAssets'
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :app:bundleReleaseJsAndAssets' completed
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :app:bundleReleaseJsAndAssets' started
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute doLast {} action for :app:bundleReleaseJsAndAssets'
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute doLast {} action for :app:bundleReleaseJsAndAssets' completed
[DEBUG] [org.gradle.api.internal.changedetection.changes.TaskFingerprintUtil] Fingerprinting property $1 (Output) for task ':app:bundleReleaseJsAndAssets'
[DEBUG] [org.gradle.api.internal.changedetection.changes.TaskFingerprintUtil] Fingerprinting property $2 (Output) for task ':app:bundleReleaseJsAndAssets'
[DEBUG] [org.gradle.internal.execution.impl.steps.CacheStep] Not storing result of task ':app:bundleReleaseJsAndAssets' in cache because the execution failed
[DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:bundleReleaseJsAndAssets'
[LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
[LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :app:bundleReleaseJsAndAssets FAILED
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:bundleReleaseJsAndAssets' completed
[INFO] [org.gradle.execution.plan.DefaultPlanExecutor] :app:bundleReleaseJsAndAssets (Thread[Execution worker for ':' Thread 6,5,main]) completed. Took 1 mins 36.118 secs.
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 6: released lock on :
[DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.104 completed (1 worker(s) in use)
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':' Thread 6: released lock on root.1.104
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 6,5,main]] finished, busy: 1 mins 39.017 secs, idle: 2.752 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 2,5,main]] finished, busy: 0.876 secs, idle: 1 mins 40.893 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':',5,main]] finished, busy: 0.784 secs, idle: 1 mins 40.986 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 7,5,main]] finished, busy: 0.867 secs, idle: 1 mins 40.902 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Daemon worker Thread 2,5,main]] finished, busy: 2.786 secs, idle: 1 mins 38.983 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 5,5,main]] finished, busy: 0.808 secs, idle: 1 mins 40.962 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 4,5,main]] finished, busy: 1.4 secs, idle: 1 mins 40.37 secs
[DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 3,5,main]] finished, busy: 1.015 secs, idle: 1 mins 40.755 secs
[DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 1 mins 41.778 secs
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #0: shutdown
[DEBUG] [org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices] [KOTLIN] Disposed KotlinGradleBuildServices
[DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
[DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 2: released lock on root.1
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #1: shutdown
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Where:
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Script '/Users/Michele/Documents/App/app-android/node_modules/react-native-sentry/sentry.gradle' line: 176
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:bundleReleaseJsAndAssets'.
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not find method execute() for arguments [] on task ':app:bundleReleaseJsAndAssetsreleaseSentryUpload' of type org.gradle.api.tasks.Exec.
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #2: shutdown
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
[ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
[WARN] [org.gradle.internal.featurelifecycle.LoggingDeprecatedFeatureHandler] 
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
[ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
[ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 58s
[LIFECYCLE] [org.gradle.internal.buildevents.TaskExecutionStatisticsReporter] 61 actionable tasks: 56 executed, 5 up-to-date
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #3: shutdown
[DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run build' completed
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #4: shutdown
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #5: shutdown
[INFO] [org.gradle.api.Task] AAPT2 aapt2-3.4.1-5326820-osx Daemon #6: shutdown
bernhardt1 commented 5 years ago

@maieonbrix This error log contains the same error message that the issue is referring to:

15:10:06.281 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTING
15:10:06.282 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command 'node_modules/@sentry/cli/bin/sentry-cli'.
15:10:06.285 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: STARTED
15:10:06.285 [DEBUG] [org.gradle.process.internal.ExecHandleRunner] waiting until streams are handled...
15:10:06.285 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command 'node_modules/@sentry/cli/bin/sentry-cli''
15:10:06.360 [QUIET] [system.out] Processing react-native sourcemaps for Sentry upload.
15:10:06.360 [QUIET] [system.out] > Analyzing 2 sources
15:10:06.537 [ERROR] [system.err] error: No such file or directory (os error 2)
15:10:06.537 [ERROR] [system.err] 
15:10:06.537 [ERROR] [system.err] Add --log-level=[info|debug] or export SENTRY_LOG_LEVEL=[info|debug] to see more output.
15:10:06.537 [ERROR] [system.err] Please attach the full debug log to all bug reports.
15:10:06.541 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
15:10:06.542 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with exit value 1 (state: FAILED)
15:10:06.542 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute exec for :app:bundleReleaseJsAndAssets_SentryUpload'
15:10:06.543 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute exec for :app:bundleReleaseJsAndAssets_SentryUpload' completed
15:10:06.543 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter] Removed task artifact state for {} from context.
15:10:06.543 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:bundleReleaseJsAndAssets_SentryUpload'
15:10:06.543 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :app:bundleReleaseJsAndAssets_SentryUpload'
15:10:06.543 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :app:bundleReleaseJsAndAssets_SentryUpload' completed
15:10:06.543 [INFO] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] :app:bundleReleaseJsAndAssets_SentryUpload (Thread[Task worker for ':' Thread 6,5,main]) completed. Took 0.263 secs.
15:10:06.543 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 6: released lock on :
15:10:06.543 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.120 completed (1 worker(s) in use)
15:10:06.543 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Task worker for ':' Thread 6: released lock on root.1.120
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 6,5,main]] finished, busy: 1.762 secs, idle: 1.989 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 4,5,main]] finished, busy: 0.161 secs, idle: 3.59 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 3,5,main]] finished, busy: 0.139 secs, idle: 3.612 secs
15:10:06.544 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 2,5,main]] finished, busy: 0.195 secs, idle: 3.556 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 10,5,main]] finished, busy: 0.476 secs, idle: 3.275 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 5,5,main]] finished, busy: 0.25 secs, idle: 3.501 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':',5,main]] finished, busy: 0.129 secs, idle: 3.622 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 8,5,main]] finished, busy: 0.283 secs, idle: 3.468 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 7,5,main]] finished, busy: 0.133 secs, idle: 3.618 secs
15:10:06.543 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 9,5,main]] finished, busy: 0.158 secs, idle: 3.593 secs
15:10:06.544 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 11,5,main]] finished, busy: 0.354 secs, idle: 3.397 secs
15:10:06.544 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskPlanExecutor] Task worker [Thread[Task worker for ':' Thread 7,5,main]] finished, busy: 0.469 secs, idle: 3.282 secs
15:10:06.544 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 3.754 secs
15:10:06.544 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
15:10:06.544 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload'.
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process 'command 'node_modules/@sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.  Run with --scan to get full insights.
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
15:10:06.545 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
15:10:06.545 [WARN] [org.gradle.internal.featurelifecycle.LoggingDeprecatedFeatureHandler] 
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
15:10:06.546 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] 
15:10:06.546 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 8s
15:10:06.546 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 237 actionable tasks: 1 executed, 236 up-to-date
15:10:06.546 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
15:10:06.546 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 7: released lock on root.1
15:10:06.546 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
15:10:06.546 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run build' completed
15:10:06.550 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/fileContent)
15:10:06.550 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/fileContent).
15:10:06.550 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for task history cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/taskHistory)
15:10:06.550 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/taskHistory).
15:10:06.550 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/buildOutputCleanup)
15:10:06.550 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/buildOutputCleanup).
15:10:06.551 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-supplier (/Users/golbez/.gradle/caches/4.10.1/md-supplier)
15:10:06.551 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-supplier (/Users/golbez/.gradle/caches/4.10.1/md-supplier).
15:10:06.551 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-rule (/Users/golbez/.gradle/caches/4.10.1/md-rule)
15:10:06.551 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-rule (/Users/golbez/.gradle/caches/4.10.1/md-rule).
15:10:06.552 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
15:10:06.552 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 129, disk reads: 83 (avg: 0.0 secs, total: 0.0 secs)
15:10:06.552 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.0 secs
15:10:06.552 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
15:10:06.553 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
15:10:06.553 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/fileHashes)
15:10:06.553 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/fileHashes/fileHashes.bin)
15:10:06.554 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/fileHashes).
15:10:06.554 [DEBUG] [org.gradle.cache.internal.DefaultPersistentDirectoryStore] VCS Checkout Cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/vcs-1) has last been fully cleaned up 0 hours ago
15:10:06.554 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS Checkout Cache (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/vcs-1) was closed 0 times.
15:10:06.554 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS metadata (/Users/golbez/React-Native/levity_04-30-2019/Levity/android/.gradle/4.10.1/vcsMetadata-1) was closed 0 times.
15:10:06.555 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
15:10:06.589 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@57bc3a4e
15:10:06.589 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 14: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
15:10:06.590 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload'.] from daemon DaemonInfo{pid=52856, address=[74042eae-0513-459a-bde5-c186bfc8a092 port:58047, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1564524500699, context=DefaultDaemonContext[uid=62e8a853-3716-48e3-9d90-42b21da02d37,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home,daemonRegistryDir=/Users/golbez/.gradle/daemon,pid=52856,idleTimeout=10800000,daemonOpts=-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=CA,-Duser.language=en,-Duser.variant]} (build should be done).
15:10:06.590 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
15:10:06.590 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
bernhardt1 commented 5 years ago

This issue could be related to react-native-0.60.+ https://github.com/getsentry/sentry-react-native/issues/612#issuecomment-516331668 https://github.com/getsentry/sentry-react-native/issues/612#issuecomment-516608950

I am on RN 0.60.3 and react-native-sentry 0.43.2

mezod commented 5 years ago

So I made a build successfully. Immediate next one fails. Now can't build. Any updates on this?

esbenvb commented 5 years ago

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

]
vforvasile commented 5 years ago

this is still an issue

EDIT: after linking the new version of @sentry/react-native a new AuthToken was generated for both platforms.

I copied the new token and reverted to the old package using the new token in (ios/sentry.properties and android/sentry.properties) - auth.token=${newToken} and it works.

bneigher commented 5 years ago

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

todorone commented 5 years ago

I recreated sentry.properties with the new wizard, Android build is failing, while iOS works perfectly. Using RN0.59.

[19:48:22]: ▸ > Task :app:bundleBetaJsAndAssets SKIPPED
[19:48:22]: ▸ > Task :app:bundleBetaJsAndAssets_SentryUpload FAILED
[19:48:22]: ▸ INFO    2019-09-20 19:48:22.463665 +03:00 Loaded config from /Users/fedir/.sentryclirc
[19:48:22]: ▸ DEBUG   2019-09-20 19:48:22.464485 +03:00 sentry-cli version: 1.47.1, platform: "darwin", architecture: "x86_64"
[19:48:22]: ▸ INFO    2019-09-20 19:48:22.464510 +03:00 sentry-cli was invoked with the following command line: "/Users/fedir/dev/wallet-mobile-native/node_modules/@sentry/cli/sentry-cli" "react-native" "gradle" "--bundle" "/Users/fedir/dev/wallet-mobile-native/android/app/build/generated/assets/react/beta/index.android.bundle" "--sourcemap" "/Users/fedir/dev/wallet-mobile-native/android/app/build/generated/assets/react/beta/index.android.bundle.map" "--release" "com.liquiditynetwork.wallet.debug-1.22.2" "--dist" "152"
[19:48:22]: ▸ Processing react-native sourcemaps for Sentry upload.
[19:48:22]: ▸ INFO    2019-09-20 19:48:22.466366 +03:00   bundle path: /Users/fedir/dev/wallet-mobile-native/android/app/build/generated/assets/react/beta/index.android.bundle
[19:48:22]: ▸ INFO    2019-09-20 19:48:22.466379 +03:00   sourcemap path: /Users/fedir/dev/wallet-mobile-native/android/app/build/generated/assets/react/beta/index.android.bundle.map
[19:48:22]: ▸ > Analyzing 2 sources
[19:48:22]: ▸ DEBUG   2019-09-20 19:48:22.466758 +03:00 Non-file bundle found
[19:48:22]: ▸ DEBUG   2019-09-20 19:48:22.467184 +03:00 error: running update nagger
[19:48:22]: ▸ DEBUG   2019-09-20 19:48:22.467695 +03:00 skipping update nagger because session is not attended
[19:48:22]: ▸ error: No such file or directory (os error 2)
[19:48:22]: ▸ DEBUG   2019-09-20 19:48:22.470280 +03:00 client close; no transport to shut down  (from sentry)

There is no folder /android/app/build/generated/assets/react/beta/ being generated. @HazAT Any hint on where to dig into would be super-helpful...

UPDATE: Sorry, it was my fault. I added beta variant which did not work. Renaming it to releaseBeta resolved the issue...

rk85097 commented 5 years ago

Any news here? I am experiencing it as well.

travega commented 4 years ago

Its been 6 months please anything? 🙏

marcferna commented 4 years ago

I've been having this issue too. My issue when running with SENTRY_LOG_LEVEL=debug was that couldn't find the bundle like the one @todorone was experiencing.

Non-file bundle found

When I build iOS, I save the build artifacts (IPA, xcarchive, etc) under project-root/output and for some reason, Gradle looks at that folder when doing the bundleXJsAndAssets and it was failing to generate the files under /android/app/build/generated/assets/react/X/ thus the bundleXJsAndAssets_SentryUpload task was failing.

Just removing my project-root/output directory fixed it.

Hope this helps somebody.

CyxouD commented 4 years ago

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)

gilador commented 3 years ago

One thing made it to work on Android - THE matchingFallbacks property in the variant buildTypes. That is due to the fact that sentry build configuration is available only for two build variant types: debug and release.

code: otherVariant { ..... matchingFallbacks = ['debug','release'] .... }

kirildobrev919 commented 2 years ago

Hi, I'm working on android app and I had the same build error and it appears to be caused by sentry-release.properties file which was in ios folder. I moved the file in android folder and got the build successful. I hope that helps to somebody.

c-emil commented 2 years ago

It happened to me when sentry.io server was down. When it was up, the build succeeded.

Also, the error can happen if your JS bundle fails to build and thus the sentry task fails right after.

qamb110 commented 2 years ago

Thanks its work

antonigiske commented 1 month ago

I just had the same issue. I assumed it was because I changed the organisation slug on sentry, but I updated the environment variables.

But it seems you also have to create a new auth token, after you change org. slug. The old one didn't work.