Intermittent failure: lateinit property rootDir has not been initialized

#738 · open · 2 comments

View on GitHub ↗

sproctor

- [x] I have read the [guidelines for submitting issues] ## 🐛 Describe the bug About 1 in 4 times it runs, I get this error: ``` 7:30:35 AM: Executing 'refreshVersions'… Reusing configuration cache. > Task :refreshVersions FAILED 1 actionable task: 1 executed Configuration cache entry reused. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':refreshVersions'. > lateinit property rootDir has not been initialized ``` I don't reference `rootDir` anywhere in my project and it only happens with `refreshVersions`. I assume it's something to do with the configuration cache. ## 💣 Steps to reproduce Uncertain. The problem is extremely intermittent. If it happens once, it will typically continue to happen.

Comments

sproctor

Managed to get a stacktrace: ``` kotlin.UninitializedPropertyAccessException: lateinit property rootDir has not been initialized at de.fayard.refreshVersions.core.internal.OutputFile$Companion.checkWhichFilesExist(OutputFile.kt:94) at de.fayard.refreshVersions.core.RefreshVersionsTask.taskActionRefreshVersions(RefreshVersionsTask.kt:74) ```

sproctor

As a work-around, I need to run with `--no-configuration-cache`.