Skip to content

Sentry 6.7.0 causes StackOverflow when linting OSS Licences Plugin #2364

Closed

Description

@barry-irvine

Integration

sentry-android

Build System

Gradle

AGP Version

7.3.1

Proguard

Enabled

Version

6.7.0

Steps to Reproduce

The project build.gradle has the following dependency

classpath "com.google.android.gms:oss-licenses-plugin:0.10.5"

The app module build.gradle has the following plugin enabled:

id 'com.google.android.gms.oss-licenses-plugin'

and adds the following implementation:

implementation "com.google.android.gms:play-services-oss-licenses:17.0.0"

I then run

./gradlew lintRelease

Expected Result

App lints successfully

Actual Result

I get the following error

Execution failed for task ':app:releaseOssLicensesTask'.
> java.lang.StackOverflowError (no error message)

Activity

  1. romtsn commented on Nov 15, 2022

    @romtsn
    Contributor

    Hey, thanks for the report. Could you share how do you define the sentry dependency? Also, are you using our Sentry Android Gradle plugin?

  2. barry-irvine commented on Nov 15, 2022

    @barry-irvine
    Author

    Yep. Using your plugin:

    id 'io.sentry.android.gradle' version '3.3.0' // Nov 2022

    And adding:

         implementation "io.sentry:sentry-android:6.7.0"
         implementation "io.sentry:sentry-android-okhttp:6.7.0"
    
  3. barry-irvine commented on Nov 15, 2022

    @barry-irvine
    Author

    I should also mention that it works fine with Sentry 6.6.0 and no other dependencies/versions being changed.

  4. romtsn commented on Nov 15, 2022

    @romtsn
    Contributor

    interesting. Do you keep the gradle plugin version at 3.3.0 when downgrading sentry deps to 6.6.0?

  5. barry-irvine commented on Nov 15, 2022

    @barry-irvine
    Author
  6. romtsn commented on Nov 16, 2022

    @romtsn
    Contributor

    One more question - do you use jetpack compose in your app?

  7. barry-irvine commented on Nov 17, 2022

    @barry-irvine
    Author

    Yes. Currently using Compose 1.2.0 with Compiler 1.3.2 and various accompanist libraries

  8. romtsn commented on Nov 17, 2022

    @romtsn
    Contributor

    alright, I think I know what the problem is. You can try to mitigate it by disabling auto-installation in the plugin configuration

    sentry {
      autoInstallation.enabled = false
    }
    

    We'll try to fix it in the meantime

  9. barry-irvine commented on Feb 9, 2023

    @barry-irvine
    Author

    Any news on this? You said the effort was small and now you're saying there's a bug between 6.6.0 and 6.8.0 but still no fix for this. If I disable the auto installation then the chances are that it will get forgotten when this code actually does work...

  10. Melle010 commented on Feb 14, 2023

    @Melle010

    Hi, I also get this StackOverflowError when I include the Android Glance library which uses Jetpack Compose internally:

    Cause: java.lang.StackOverflowError
    	at com.google.common.cache.LocalCache$Segment.setValue(LocalCache.java:2009)
    	at com.google.common.cache.LocalCache$Segment.storeLoadedValue(LocalCache.java:3158)
    	at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2318)
    	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2279)
    	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2155)
    	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045)
    	at com.google.common.cache.LocalCache.get(LocalCache.java:3962)
    	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4859)
    	at org.gradle.internal.resources.AbstractResourceLockRegistry.getOrRegisterResourceLock(AbstractResourceLockRegistry.java:45)
    	at org.gradle.internal.work.DefaultWorkerLeaseService$WorkerLeaseLockRegistry.getResourceLock(DefaultWorkerLeaseService.java:351)
    	at org.gradle.internal.work.DefaultWorkerLeaseService.getWorkerLease(DefaultWorkerLeaseService.java:93)
    	at org.gradle.internal.work.DefaultWorkerLeaseService.getWorkerLease(DefaultWorkerLeaseService.java:100)
    	at org.gradle.internal.work.DefaultWorkerLeaseService.getWorkerLease(DefaultWorkerLeaseService.java:55)
    	at org.gradle.internal.operations.DefaultBuildOperationQueue.<init>(DefaultBuildOperationQueue.java:56)
    	at org.gradle.internal.operations.DefaultBuildOperationQueueFactory.create(DefaultBuildOperationQueueFactory.java:31)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.executeInParallel(DefaultBuildOperationExecutor.java:132)
    	at org.gradle.internal.operations.DefaultBuildOperationExecutor.runAll(DefaultBuildOperationExecutor.java:102)
    	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.ParallelResolveArtifactSet$VisitingSet.visit(ParallelResolveArtifactSet.java:66)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.sort(DefaultResolvedDependency.java:129)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getModuleArtifacts(DefaultResolvedDependency.java:107)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:113)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)
    	at org.gradle.api.internal.artifacts.DefaultResolvedDependency.getAllModuleArtifacts(DefaultResolvedDependency.java:115)
    ...
    

    It helped to disable auto installation for Sentry, but a bugfix would be great so we can use the auto installation feature again.

  11. EmDee commented on Feb 20, 2023

    @EmDee

    @romtsn any updates here?

  12. romtsn commented on Mar 1, 2023

    @romtsn
    Contributor

    hey, apologies for holding this off for so long, I've just opened up a PR (#2578) which fixes the issue, so it should be resolved in the upcoming release of the Gradle plugin.

    Also, added an integration test for the gradle plugin to make sure we do not break this again in the future getsentry/sentry-android-gradle-plugin#442. Thanks everyone for the patience!

  13. ghost added
    Bug
    on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions