Could not load compiled classes for initialization script
See original GitHub issueWe often see the following failure when executing jobs with a gradle-build-action in various workflows. What they all have in common when the error occurs is that the id build_scan_capture_init_6jxid5m3sbemobrv5hpcfrrqr is printed. Is there any advice to work around or fix this problem? Could it be a broken cache entry?
Run gradle/gradle-build-action@v2
Restore Gradle state from cache
Writing init script: /home/runner/work/_temp/build-scan-capture.init.gradle
/home/runner/work/project1/project1/gradlew some-task --no-daemon --init-script /home/runner/work/_temp/build-scan-capture.init.gradle
Downloading https://services.gradle.org/distributions/gradle-7.2-all.zip
..............10%...............20%...............30%...............40%...............50%...............60%...............70%...............80%...............90%...............100%
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build
FAILURE: Build failed with an exception.
* What went wrong:
Could not load compiled classes for initialization script '/home/runner/work/_temp/build-scan-capture.init.gradle' from cache.
> build_scan_capture_init_6jxid5m3sbemobrv5hpcfrrqr
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Could not load compiled classes for initialization script from ...
I have a multimodule Gradle project. There is a buildSrc folder inside this top-level project and it contains several Groovy Files with ...
Read more >Flutter : Could not load compiled classes for build file ...
A problem occurred configuring root project 'android'. > Could not load compiled classes for build file 'D:\FLUTTER\task_manager\android\build.
Read more >GradleException: Could not load compiled classes for build ...
Could not load compiled classes for build file 'C:\temp\gradle\test\build.gradle' from cache. * Try: Run with --stacktrace option to get the stack trace.
Read more >[Solved]-Could not load compiled classes for settings file-Flutter
Try to clear gradle cache. The <home directory>/.gradle/caches directory holds the Gradle build cache you can delete it.
Read more >Android build error. Problem with gradle.settings
GradleException : Could not load compiled classes for settings file '/bitrise/src/settings.gradle' from cache. Two different build with fails ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@wolfs In the Gradle build, it looks like happens when the instrumented jars (
~/.gradle/caches/jars-9/*/*.jar) are not being restored into Gradle User Home. This could easily happen if the cache entry is evicted due to the 5Gb cache limit.I had assumed that Gradle would simply regenerate these jars if they are not present, but I guess I need to investigate further.
https://github.com/gradle/gradle/runs/3899330504?check_suite_focus=true#step:4:67
This issue has been fixed in
v2.0-beta.5