Skip to content
Latchkey

Gradle "problems were found storing the configuration cache" in CI

With the configuration cache enabled, Gradle records the task graph and forbids accessing live build state at execution time. When a task reads project or the environment during execution, Gradle reports configuration cache problems.

What this error means

The build fails (or warns) with "N problems were found storing the configuration cache" and a report listing each disallowed access, such as "invocation of Task.project at execution time".

Gradle
1 problem was found storing the configuration cache.
- Task `:app:myTask` of type `MyTask`: invocation of 'Task.project' at execution time is unsupported.
  See https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution

See the complete report at file:///.../build/reports/configuration-cache/....html

Common causes

A task reads live project state at execution time

The task calls project.<x> or accesses build services during its action rather than capturing values at configuration time, which the configuration cache forbids.

A plugin is not configuration-cache compatible

A third-party plugin accesses disallowed state, surfacing problems you did not write.

How to fix it

Capture inputs at configuration time

  1. Open the linked configuration-cache HTML report to see each access.
  2. Move project / env reads out of the task action into properties captured during configuration.
  3. Re-run so the task no longer touches live state at execution.
build.gradle.kts
abstract class MyTask : DefaultTask() {
    @get:Input abstract val version: Property<String>
    @TaskAction fun run() { println(version.get()) } // no project.* here
}

Upgrade or replace an incompatible plugin

If a plugin causes the problems, upgrade it to a configuration-cache-compatible version, or gate the cache off until it is fixed.

Terminal
./gradlew build --no-configuration-cache

How to prevent it

  • Capture task inputs at configuration time, not in the task action.
  • Use configuration-cache-compatible plugin versions.
  • Enable the configuration cache locally so problems surface before CI.

Frequently asked questions

What causes ""problems were found storing the configuration cache""?
The task calls project.<x> or accesses build services during its action rather than capturing values at configuration time, which the configuration cache forbids.
How do I fix "problems were found storing the configuration cache"?
Capture inputs at configuration time

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card