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

Crash in Android: No caller found on the stack for: com.google.common.flogger.FluentLogger #388

Open
fanwgwg opened this issue Aug 31, 2024 · 2 comments
Labels
P3 type=defect Bug, not working as expected

Comments

@fanwgwg
Copy link

fanwgwg commented Aug 31, 2024

Using the Flogger library with the latest Android Studio Koala Feature Drop | 2024.1.2, AGP 8.6 causes this crash.

Not seeing before updating the Android Studio and AGP.

Caused by java.lang.IllegalStateException: no caller found on the stack for: com.google.common.flogger.FluentLogger
       at com.google.common.flogger.backend.system.StackBasedCallerFinder.findLoggingClass(StackBasedCallerFinder.java:46)
       at com.google.common.flogger.FluentLogger.forEnclosingClass(FluentLogger.java:68)
       at com.myapp.utils.DebugLogger.<clinit>(DebugLogger.java)
       at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:229)
       at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:216)
       at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:129)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.myapp.AppModule$1.lambda$newThread$0(AppModule.java:118)
       at java.lang.Thread.run(Thread.java:919)
@chaoren chaoren added type=defect Bug, not working as expected P3 labels Sep 23, 2024
@chaoren
Copy link
Member

chaoren commented Sep 23, 2024

Could you please share some more details like

  1. how the logger was configured
  2. the log call that triggered this
  3. the class/method containing the log call

Maybe there's some ProGuard magic going on that rewrote the class?

@chaoren
Copy link
Member

chaoren commented Sep 23, 2024

Looks like the enclosing class that the logger is trying to find is just com.myapp.utils.DebugLogger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 type=defect Bug, not working as expected
Projects
None yet
Development

No branches or pull requests

3 participants
@chaoren @fanwgwg and others