firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.23k stars 565 forks source link

Crashlytics Gradle plugin is not compatible with configuration cache #6012

Closed maxsav closed 1 week ago

maxsav commented 3 weeks ago

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

The gradle configuration cache is not supported by the task com.google.firebase.crashlytics.buildtools.gradle.tasks.GenerateSymbolFileTask

Gradle logs:

Task `:app:generateCrashlyticsSymbolFileRelease` of type `com.google.firebase.crashlytics.buildtools.gradle.tasks.GenerateSymbolFileTask`: invocation of 'Task.project' at execution time is unsupported.
See https://docs.gradle.org/8.8/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution
Invocation of 'Task.project' by task ':app:generateCrashlyticsSymbolFileRelease' at execution time is unsupported.

Related stacktrace:

org.gradle.api.InvalidUserCodeException: Invocation of 'Task.project' by task ':app:generateCrashlyticsSymbolFileRelease' at execution time is unsupported.
    at org.gradle.api.DefaultTask.getProject(DefaultTask.java:59)
        ...
    at com.google.firebase.crashlytics.buildtools.gradle.tasks.GenerateSymbolFileTask.resolveBreakpadBinary(GenerateSymbolFileTask.kt:152)
    at com.google.firebase.crashlytics.buildtools.gradle.tasks.GenerateSymbolFileTask.generateSymbolFiles(GenerateSymbolFileTask.kt:70)
        ...
    at java.base/java.lang.Thread.run(Thread.java:1583)
lehcar09 commented 3 weeks ago

Hi @maxsav, thank you for reaching out. I tried reproducing the issue, however, I'm just getting some warning. Could you try sharing me you app/build.gradle file? Thanks!

maxsav commented 3 weeks ago

The reproducible error is here https://github.com/maxsav/firebase_crashlytics_configuration_cache_issue You can see logs here https://github.com/maxsav/firebase_crashlytics_configuration_cache_issue/actions/runs/9378303532/job/25821294021

lehcar09 commented 3 weeks ago

Thank you for the MCVE you shared @maxsav. I was able to reproduce the issue. It seems that the issue occurs only for symbolGeneratorType = “breakpad” and not for type csym. I’ll notify our engineers on this and see what we can do here. Thanks!

lehcar09 commented 3 weeks ago

Hey @maxsav, according to our Eng, based on the investigation, the issue is caused by some code that was inadvertently moved into the task action to expedite the configuration process, which accidentally broke the caching.

The issue has been fixed, and it will be included in the next release in a couple weeks. We'll let you know when the fix is released.

Thanks again!

mrober commented 1 week ago

This fix was released in version 3.0.2.