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

Cannot add task bundleFooBarJsAndAssets_SentryCollectModulesCleanUp #2656

Closed
4 of 11 tasks
fabiendem opened this issue Nov 30, 2022 · 2 comments · Fixed by #2657
Closed
4 of 11 tasks

Cannot add task bundleFooBarJsAndAssets_SentryCollectModulesCleanUp #2656

fabiendem opened this issue Nov 30, 2022 · 2 comments · Fixed by #2657

Comments

@fabiendem
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 4.10.0

react-native version: 0.66.5

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

Irrelevant

Configuration:

Irrelevant


I have following issue:

Since we updated to 4.10.0 with the modules support (https://github.com/getsentry/sentry-react-native/releases/tag/4.10.0), the Android build on the CI is failing.

Steps to reproduce:

  • Try to setup the gradle tasks (do a build for example)

Actual result:

We're getting the following error message: Cannot add task 'bundleAlphaReleaseJsAndAssets_SentryCollectModulesCleanUp' as a task with that name already exists.

FAILURE: Build failed with an exception.
* Where:
Script '/Users/vagrant/git/node_modules/@sentry/react-native/sentry.gradle' line: 198
* What went wrong:
Cannot add task 'bundleAlphaReleaseJsAndAssets_SentryCollectModulesCleanUp' as a task with that name already exists.
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.internal.tasks.DefaultTaskContainer$DuplicateTaskException: Cannot add task 'bundleAlphaReleaseJsAndAssets_SentryCollectModulesCleanUp' as a task with that name already exists.
	at org.gradle.api.internal.tasks.DefaultTaskContainer.failOnDuplicateTask(DefaultTaskContainer.java:261)
....

Expected result:

No error when Gradle is being setup

Since it's related to SentryCollectModulesCleanUp, it's probably due to this change: 4.9.0...4.10.0

@marandaneto
Copy link
Contributor

@krystofwoldrich we'd need this check for the new task
https://github.com/getsentry/sentry-react-native/blob/bb4d70c6dc942f17105a529a81a74ea44cbd3023/sentry.gradle#LL89C4-L89C4

@fabiendem
Copy link
Author

Thank you folks 🙌

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

Successfully merging a pull request may close this issue.

2 participants