Open abdullRahman95 opened 4 months ago
Hi @abdullRahman95, thank you for the message, can you try to upgrade to the latest https://github.com/getsentry/sentry-react-native/releases/tag/5.19.1 with the Sentry Android Plugin 4.3.1 and let us know if the issue still occurs?
Hi @krystofwoldrich Thank you for checking this issue, I have upgraded @sentry/react-native to 5.19.1 with Android Plugin 4.3.1, and same issue still happening with the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Circular dependency between the following tasks:
:app:compileReleaseJavaWithJavac
+--- :app:compileReleaseKotlin
| +--- :app:dataBindingGenBaseClassesRelease
| | \--- :app:mergeReleaseResources
| | \--- :app:copyReleaseBundledJs
| | \--- :app:mergeReleaseAssets
| | \--- :app:generateSentryDebugMetaPropertiesRelease
| | \--- :app:generateSentryProguardUuidRelease
| | \--- :app:minifyReleaseWithR8
| | +--- :app:mergeReleaseGeneratedProguardFiles
| | | +--- :app:compileReleaseJavaWithJavac (*)
| | | +--- :app:compileReleaseKotlin (*)
| | | \--- :app:processReleaseResources
| | | \--- :app:mergeReleaseResources (*)
| | +--- :app:mergeReleaseJavaResource
| | | \--- :app:compileReleaseKotlin (*)
| | +--- :app:processReleaseResources (*)
| | \--- :app:transformReleaseClassesWithAsm
| | +--- :app:compileReleaseJavaWithJavac (*)
| | +--- :app:compileReleaseKotlin (*)
| | \--- :app:processReleaseResources (*)
| \--- :app:processReleaseResources (*)
+--- :app:dataBindingGenBaseClassesRelease (*)
\--- :app:processReleaseResources (*)
(*) - details omitted (listed previously)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --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 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 10s
I´m having the same error with the sentry-android-gradle-plugin
in Flutter
Thank you for the update @Ch4rl3B and @abdullRahman95,
we are currently unable to reproduce this,
would you be able to share a minimal reproducible example?
Can you also share your Sentry Android Gradle Plugin configuration?
@markushi @romtsn Do you have any tips on how to debug this?
I started looking into this and so far couldn't reproduce this issue. @Ch4rl3B @abdullRahman95 could you share some more details about your build environment?
Hi I have the same issue with sentry-android-gradle-plugin
. Maybe my context would be helpful
com.android.tools.build:gradle:8.3.0
io.sentry.android.gradle:4.3.1
@Karjan1 Thank you, we'll keep you posted.
Hey @Karjan1, we just released io.sentry.android.gradle:4.4.0
which contains a fix to a very similar issue. Could you give it a try?
No still getting the same error.
One thing that I found surprising is
flutter build appbundle --release
gives that error but flutter build appbundle --debug
works fine
Hi @Karjan1 - We are still facing the same problem with same stack trace with AGP 4.4.0
2024-03-27T05:55:14.1937370Z FAILURE: Build failed with an exception.
2024-03-27T05:55:14.1938000Z
2024-03-27T05:55:14.1938710Z * What went wrong:
2024-03-27T05:55:14.1939320Z Circular dependency between the following tasks:
2024-03-27T05:55:14.1939980Z :app:compileReleaseJavaWithJavac
2024-03-27T05:55:14.1941120Z +--- :app:compileReleaseKotlin
2024-03-27T05:55:14.1941970Z | +--- :app:dataBindingGenBaseClassesRelease
2024-03-27T05:55:14.1942750Z | | \--- :app:mergeReleaseResources
2024-03-27T05:55:14.1985040Z | | \--- :app:copyReleaseBundledJs
2024-03-27T05:55:14.1999580Z | | \--- :app:mergeReleaseAssets
2024-03-27T05:55:14.2000520Z | | \--- :app:generateSentryDebugMetaPropertiesRelease
2024-03-27T05:55:14.2000970Z | | \--- :app:generateSentryProguardUuidRelease
2024-03-27T05:55:14.2001380Z | | \--- :app:minifyReleaseWithR8
2024-03-27T05:55:14.2001840Z | | +--- :app:mergeReleaseGeneratedProguardFiles
2024-03-27T05:55:14.2002300Z | | | +--- :app:compileReleaseJavaWithJavac (*)
2024-03-27T05:55:14.2002720Z | | | +--- :app:compileReleaseKotlin (*)
2024-03-27T05:55:14.2003130Z | | | \--- :app:processReleaseResources
2024-03-27T05:55:14.2003530Z | | | \--- :app:mergeReleaseResources (*)
2024-03-27T05:55:14.2004100Z | | +--- :app:mergeReleaseJavaResource
2024-03-27T05:55:14.2004510Z | | | \--- :app:compileReleaseKotlin (*)
2024-03-27T05:55:14.2004950Z | | +--- :app:processReleaseResources (*)
2024-03-27T05:55:14.2005370Z | | \--- :app:transformReleaseClassesWithAsm
2024-03-27T05:55:14.2005790Z | | +--- :app:compileReleaseJavaWithJavac (*)
2024-03-27T05:55:14.2006210Z | | +--- :app:compileReleaseKotlin (*)
2024-03-27T05:55:14.2006610Z | | \--- :app:processReleaseResources (*)
2024-03-27T05:55:14.2006920Z | \--- :app:processReleaseResources (*)
2024-03-27T05:55:14.2007290Z +--- :app:dataBindingGenBaseClassesRelease (*)
2024-03-27T05:55:14.2008740Z \--- :app:processReleaseResources (*)
2024-03-27T05:55:14.2008840Z
2024-03-27T05:55:14.2010280Z (*) - details omitted (listed previously)
I gave other versions a try. io.sentry.android.gradle:4.2.0
is the last version that works. Both 4.3.0 and 4.4.0 give the same error
Quick update: I was finally able to locally reproduce this issue, at least for flutter.
But it looks like the same issue we have on RN, namely the mergeReleaseAssets
tasks being rewired by Flutter/RN which then causes our Sentry Android Gradle plugin to fail.
Circular dependency between the following tasks:
:app:compileReleaseJavaWithJavac
+--- :app:compileReleaseKotlin
| \--- :app:processReleaseResources
| \--- :app:copyFlutterAssetsRelease
| \--- :app:mergeReleaseAssets
| \--- :app:generateSentryDebugMetaPropertiesRelease
| \--- :app:generateSentryProguardUuidRelease
| \--- :app:minifyReleaseWithR8
| +--- :app:mergeReleaseGeneratedProguardFiles
| | +--- :app:compileReleaseJavaWithJavac (*)
| | +--- :app:compileReleaseKotlin (*)
| | \--- :app:processReleaseResources (*)
| +--- :app:mergeReleaseJavaResource
| | \--- :app:compileReleaseKotlin (*)
| +--- :app:processReleaseResources (*)
| \--- :app:transformReleaseClassesWithAsm
| +--- :app:compileReleaseJavaWithJavac (*)
| +--- :app:compileReleaseKotlin (*)
| \--- :app:processReleaseResources (*)
\--- :app:processReleaseResources (*)
I'll keep you posted about any updates!
@Karjan1 we shipped a fix for this in io.sentry.android.gradle:4.4.1
, would you mind giving it a try?
Circular dependency between the following tasks: :app:processReleaseResources --- :app:processReleaseResources (*)
How to resolve this
I started looking into this and so far couldn't reproduce this issue. @Ch4rl3B @abdullRahman95 could you share some more details about your build environment?
- AGP version
- Gradle version
- Are you using DexGuard?
Hey, how do you enable dexguardEnabled flag for expo/sentry-react-native?
@markushi I'm facing a similar problem following the documentation, once I reach this point: https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp and that's applying the plugin
apply plugin: "io.sentry.android.gradle"
I start getting a circular dependency when building a release app
:app:compileStagingReleaseJavaWithJavac
\--- :app:processStagingReleaseResources
+--- :app:mapStagingReleaseSourceSetPaths
| \--- :app:mergeStagingReleaseResources
| \--- :app:copyStagingReleaseBundledJs
| \--- :app:mergeStagingReleaseAssets
| \--- :app:generateSentryDebugMetaPropertiesStagingRelease
| \--- :app:generateSentryProguardUuidStagingRelease
| \--- :app:minifyStagingReleaseWithR8
| +--- :app:mergeStagingReleaseGeneratedProguardFiles
| | +--- :app:compileStagingReleaseJavaWithJavac (*)
| | \--- :app:processStagingReleaseResources (*)
| +--- :app:processStagingReleaseResources (*)
| \--- :app:transformStagingReleaseClassesWithAsm
| +--- :app:compileStagingReleaseJavaWithJavac (*)
| \--- :app:processStagingReleaseResources (*)
\--- :app:mergeStagingReleaseResources (*)
"@sentry/react-native": "^5.22.2"
UPDATE
I got it to build by downgrading the plugin in android/build.gradle
from 4.6.0
to 4.2.0
dependencies {
classpath 'io.sentry:sentry-android-gradle-plugin:4.2.0'
}
Thank you everyone for the comment, we are reopening the issue and will investigate it.
OS:
Platform:
SDK:
@sentry/react-native
(>= 1.0.0)SDK version: 5.17.0
react-native
version: 0.67.5Are you using Expo?
Are you using sentry.io or on-premise?
If you are using sentry.io, please post a link to your issue so we can take a look:
[Link to issue]
Configuration:
(
@sentry/react-native
)I have the following issue:
When I upgraded "@sentry/react-native" from 5.13.0 to 5.17.0, and was trying to create a release build for android (react-native), I'm getting the following error:
I tried to update sentryGradlePluginVersion in android\build.gradle file to 4.3.1 as specified in the documentation (https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#android, https://mvnrepository.com/artifact/io.sentry/sentry-android-gradle-plugin) but no luck, could you please help on this?