Cannot determine task state changes for task


(John Soman) #1

Hi, I’m getting this error when building my project. I’m on Gradle 4.1

Caused by: java.lang.NullPointerException: null value in entry: rootSpec$1=null

Cannot determine task state changes for task ':3a825075ed15f141:master_project:sub_project:processResources'

Could anyone please point me to the right direction as what it may be caused by? What is this random string in front of my master_project?

Full stack trace below:

[10:42:44]W:	 [Step 10/13] 
[10:42:44] :	 [Step 10/13] 213 actionable tasks: 208 executed, 5 up-to-date
[10:42:44]i:	 [Step 10/13] ##teamcity[buildProblem identity='-535690912' description='java.lang.NullPointerException: null value in entry: rootSpec$1=null' type='gradleBuildProblem']
[10:42:44]W:	 [Step 10/13] Process exited with code 1
[10:42:44]W:	 [Step 10/13] Gradle failure report
[10:42:44]W:		 [Gradle failure report] FAILURE: Build failed with an exception.
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] * What went wrong:
[10:42:44]W:		 [Gradle failure report] Cannot determine task state changes for task ':3a825075ed15f141:master_project:sub_project:processResources'
[10:42:44]W:		 [Gradle failure report] > null value in entry: rootSpec$1=null
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] * Try:
[10:42:44]W:		 [Gradle failure report] Run with --info or --debug option to get more log output.
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] * Exception is:
[10:42:44]W:		 [Gradle failure report] org.gradle.api.GradleException: Cannot determine task state changes for task ':3a825075ed15f141:master_project:sub_project:processResources'
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.ErrorHandlingTaskStateChanges$1.computeNext(ErrorHandlingTaskStateChanges.java:55)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.ErrorHandlingTaskStateChanges$1.computeNext(ErrorHandlingTaskStateChanges.java:47)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:54)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
[10:42:44]W:		 [Gradle failure report] Caused by: java.lang.NullPointerException: null value in entry: rootSpec$1=null
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:135)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:206)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.ImmutableSortedMap$Builder.put(ImmutableSortedMap.java:371)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository$LazyTaskExecution.getInputFilesSnapshot(CacheBackedTaskHistoryRepository.java:196)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.getPrevious(InputFilesTaskStateChanges.java:38)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.AbstractNamedFileSnapshotTaskStateChanges.getFileChanges(AbstractNamedFileSnapshotTaskStateChanges.java:99)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.iterator(InputFilesTaskStateChanges.java:43)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.reset(CachingTaskStateChanges.java:79)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.iterator(CachingTaskStateChanges.java:44)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.firstDirtyIterator(SummaryTaskStateChanges.java:63)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.access$000(SummaryTaskStateChanges.java:25)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:49)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:42)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
[10:42:44]W:		 [Gradle failure report] 	at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
[10:42:44]W:		 [Gradle failure report] 	at org.gradle.api.internal.changedetection.rules.ErrorHandlingTaskStateChanges$1.computeNext(ErrorHandlingTaskStateChanges.java:51)
[10:42:44]W:		 [Gradle failure report] 	... 30 more
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] * Get more help at https://help.gradle.org
[10:42:44]W:		 [Gradle failure report] 
[10:42:44]W:		 [Gradle failure report] BUILD FAILED in 2m 4s

Removing .gradle directory helps but is not a viable solution as the problem keeps coming back.


(Stefan Wolf) #2

Let’s keep the discussion on https://github.com/gradle/gradle/issues/2827.