IllegalArgumentException: 'other' has different root

  • ALM used: Gitlab
  • CI system used: Jenkins
  • C++
  • report-task.txt not found
[2024-06-14T08:05:17.348Z] 10:05:17.195 INFO  The property "sonar.tests" is not set. To improve the analysis accuracy, we categorize a file as a test file if any of the following is true:
[2024-06-14T08:05:17.348Z]   * The filename starts with "test"
[2024-06-14T08:05:17.348Z]   * The filename contains "test." or "tests."
[2024-06-14T08:05:17.348Z]   * Any directory in the file path is named: "doc", "docs", "test" or "tests"
[2024-06-14T08:05:17.348Z]   * Any directory in the file path has a name ending in "test" or "tests"
[2024-06-14T08:05:17.348Z] 
[2024-06-14T08:05:17.914Z] powershell.exe : 10:05:17.800 ERROR Error during SonarScanner Engine execution
[2024-06-14T08:05:17.914Z] At C:\sl\MIT\source\modules\MQTTItemTemplate@tmp\durable-a08f8417\powershellWrapper.ps1:3 char:1
[2024-06-14T08:05:17.914Z] + & powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Comm ...
[2024-06-14T08:05:17.914Z] + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[2024-06-14T08:05:17.914Z]     + CategoryInfo          : NotSpecified: (10:05:17.800 ER...ngine execution:String) [], RemoteException
[2024-06-14T08:05:17.914Z]     + FullyQualifiedErrorId : NativeCommandError
[2024-06-14T08:05:17.914Z]  
[2024-06-14T08:05:17.914Z] java.lang.IllegalArgumentException: 'other' has different root
[2024-06-14T08:05:17.914Z] 	at java.base/sun.nio.fs.WindowsPath.relativize(Unknown Source)
[2024-06-14T08:05:17.914Z] 	at java.base/sun.nio.fs.WindowsPath.relativize(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at org.sonar.plugins.common.git.GitTrackedFilePredicate.apply(GitTrackedFilePredicate.java:50)
[2024-06-14T08:05:18.190Z] 	at org.sonar.api.batch.fs.internal.predicates.OptimizedFilePredicateAdapter.apply(OptimizedFilePredicateAdapter.java:21)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at java.base/java.util.Spliterators$1Adapter.hasNext(Unknown Source)
[2024-06-14T08:05:18.190Z] 	at org.sonar.plugins.common.TextAndSecretsSensor.getInputFiles(TextAndSecretsSensor.java:265)
[2024-06-14T08:05:18.190Z] 	at org.sonar.plugins.common.TextAndSecretsSensor.execute(TextAndSecretsSensor.java:118)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:399)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:131)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
[2024-06-14T08:05:18.190Z] 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:135)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:52)
[2024-06-14T08:05:18.190Z] 	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:38)
[2024-06-14T08:05:18.190Z] 
[2024-06-14T08:05:18.472Z] 10:05:18.206 INFO  EXECUTION FAILURE
[2024-06-14T08:05:18.472Z] 10:05:18.206 INFO  Total time: 31.466s

[2024-06-14T08:05:19.472Z] WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?

The problem happens for all our projects since yesterday in the afternoon (maybe before).

1 Like

Sooner in the log, I have also :

[2024-06-14T08:04:57.602Z] Property 'sonar.cfamily.build-wrapper-output' is deprecated; build-wrapper now generates a compilation database.
[2024-06-14T08:04:57.602Z] Please use the property 'sonar.cfamily.compile-commands' instead to specify the path of the 'compile_commands.json' file generated inside the build-wrapper output directory.
[2024-06-14T08:04:57.602Z] Visit the documentation for more up-to-date information on analysis using build-wrapper https://docs.sonarcloud.io/advanced-setup/languages/c-c-objective-c/

The given page is not so up-to-date, 'cause it still asks to add the property sonar.cfamily.build-wrapper-output…

We recently got the Scanner working on one of our Java Projects that Builds in Gradle. It worked for about a week then suddenly this week, without changing anything I’m aware of (definitely no code changes or gradle changes) it stopped working and returned an error:

Execution failed for task ':sonar'.
> 'other' has different root
  • These failures are both in the Azure DevOps Yaml Pipeline as well as locally.
  • I’ve checked for references to “other” but none, nor files/ folders named other.
  • I tried setting each of the sub modules in the project to isSkipProject to true and I still get the error even though there is no content to scan.
  • I’ve included the stack trace below which led me to TextAndSecretsSensor.java and searching that I came to the secrets page. This has gave me a work around of setting sonar.text.inclusions.activate to false and now I no longer get the error but only because I’m skipping the problem code.

Gradle - 8.8
Sonar Plugin - 5.0.0.4638
Gradle Multi Module Project

Gradle stack trace:

 * Exception is:
 org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonar'.
 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:130)
 	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:128)
 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
 	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
 	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
 	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
 	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
 Caused by: java.lang.IllegalArgumentException: 'other' has different root
 	at org.sonar.plugins.common.git.GitTrackedFilePredicate.apply(GitTrackedFilePredicate.java:50)
 	at org.sonar.api.batch.fs.internal.predicates.OptimizedFilePredicateAdapter.apply(OptimizedFilePredicateAdapter.java:21)
 	at org.sonar.plugins.common.TextAndSecretsSensor.getInputFiles(TextAndSecretsSensor.java:265)
 	at org.sonar.plugins.common.TextAndSecretsSensor.execute(TextAndSecretsSensor.java:118)
 	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:62)
 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:75)
 	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:51)
 	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:64)
 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
 	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:192)
 	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:188)
 	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:159)
 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
 	at org.sonar.scanner.bootstrap.ScannerContainer.doAfterStart(ScannerContainer.java:399)
 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
 	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:131)
 	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
 	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:60)
 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:54)
 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
 	at jdk.proxy29/jdk.proxy29.$Proxy278.execute(Unknown Source)
 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
 	at org.sonarqube.gradle.SonarTask.run(SonarTask.java:131)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
 	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
 	at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:244)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:47)
 	at org.gradle.api.internal.tasks.execution.TaskExecution.executeAction(TaskExecution.java:229)
 	at org.gradle.api.internal.tasks.execution.TaskExecution.executeActions(TaskExecution.java:212)
 	at org.gradle.api.internal.tasks.execution.TaskExecution.executeWithPreviousOutputFiles(TaskExecution.java:195)
 	at org.gradle.api.internal.tasks.execution.TaskExecution.execute(TaskExecution.java:162)
 	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:105)
 	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:44)
 	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:59)
 	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:56)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
 	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:56)
 	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:44)
 	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
 	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
 	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
 	at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:50)
 	at org.gradle.internal.execution.steps.PreCreateOutputParentsStep.execute(PreCreateOutputParentsStep.java:28)
 	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:67)
 	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:37)
 	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:61)
 	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:26)
 	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:67)
 	at org.gradle.internal.execution.steps.CaptureOutputsAfterExecutionStep.execute(CaptureOutputsAfterExecutionStep.java:45)
 	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:40)
 	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:29)
 	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:189)
 	at org.gradle.internal.execution.steps.BuildCacheStep.lambda$execute$1(BuildCacheStep.java:75)
 	at org.gradle.internal.Either$Right.fold(Either.java:175)
 	at org.gradle.internal.execution.caching.CachingState.fold(CachingState.java:62)
 	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:73)
 	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:48)
 	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:46)
 	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:35)
 	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:76)
 	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$2(SkipUpToDateStep.java:54)
 	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:54)
 	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
 	at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:49)
 	at org.gradle.internal.execution.steps.ResolveIncrementalCachingStateStep.executeDelegate(ResolveIncrementalCachingStateStep.java:27)
 	at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:71)
 	at org.gradle.internal.execution.steps.AbstractResolveCachingStateStep.execute(AbstractResolveCachingStateStep.java:39)
 	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:65)
 	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:36)
 	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:106)
 	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:55)
 	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:64)
 	at org.gradle.internal.execution.steps.AbstractCaptureStateBeforeExecutionStep.execute(AbstractCaptureStateBeforeExecutionStep.java:43)
 	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.executeWithNonEmptySources(AbstractSkipEmptyWorkStep.java:125)
 	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:56)
 	at org.gradle.internal.execution.steps.AbstractSkipEmptyWorkStep.execute(AbstractSkipEmptyWorkStep.java:36)
 	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
 	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:36)
 	at org.gradle.internal.execution.steps.LoadPreviousExecutionStateStep.execute(LoadPreviousExecutionStateStep.java:23)
 	at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:75)
 	at org.gradle.internal.execution.steps.HandleStaleOutputsStep.execute(HandleStaleOutputsStep.java:41)
 	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.lambda$execute$0(AssignMutableWorkspaceStep.java:35)
 	at org.gradle.api.internal.tasks.execution.TaskExecution$4.withWorkspace(TaskExecution.java:289)
 	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:31)
 	at org.gradle.internal.execution.steps.AssignMutableWorkspaceStep.execute(AssignMutableWorkspaceStep.java:22)
 	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:40)
 	at org.gradle.internal.execution.steps.ChoosePipelineStep.execute(ChoosePipelineStep.java:23)
 	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.lambda$execute$2(ExecuteWorkBuildOperationFiringStep.java:67)
 	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:67)
 	at org.gradle.internal.execution.steps.ExecuteWorkBuildOperationFiringStep.execute(ExecuteWorkBuildOperationFiringStep.java:39)
 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:46)
 	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:34)
 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:48)
 	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
 	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:61)
 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:127)
 	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:116)
 	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
 	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
 	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
 	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:74)
 	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59)
 	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53)
 	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
 	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:42)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:331)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:318)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.lambda$execute$0(DefaultTaskExecutionGraph.java:314)
 	at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
 	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
 	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
 	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
 	at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
 

Hi all,

I’ve combined your threads because they have the same root error:

'other' has different root

It’s striking to me that you’re both experiencing this on entirely(?) different stacks. I’ve never seen this error before but since you’re both independently getting it, I’m confident this isn’t on your side but ours. I’ve flagged it for the team.

 
Ann

Hi again,

Perhaps I should search before I type. :flushed:

We have actually seen this before, but it’s been a while.

This is caused by symlinks and/or having files in different drives.

SONAR-14210 Add Support for Scanning Projects With Path on Different Roots

 
HTH,
Ann

I’ll have a look if I can find any symlinks but running the scan on a commit that previously scanned ok is now failing with this error. This would rule out symlinks in the repo and the location I’ve checked out to and running scan is all on a single drive without any symlinks.

EDIT: Also both our issues look to come from TextAndSecretsSensor yet the original issue doesn’t mention this. Sounds like we’ve both had this working and without change on our end it’s started to fail.

1 Like

Hi @Paul_Birtle,

Thanks for pointing that out!

I’m redirecting this internally.

Could you provide a full analysis log? Even better if it’s debug level.

 
Thx,
Ann

Hi again,

It’s possible this is related to

SONARTEXT-153 Implement Automatic Test File Detection in case sonar.tests property is not set

Altho I would expect Gradle to properly identify the test files.

But that means you should be able to work around this by making sure sonar.tests is specified.

 
Ann

Sure, what’s the best way to share it besides posting it publicly on here?

To what ? We have no tests.

1 Like

Setting sonar.text.inclusions.activate=false worked for me until this is fixed. This does mean secret scanning will be disabled, but it works because it avoids the area of the scanner throwing the error.

Hi @Paul_Birtle,

I’m glad you found a workaround. If you’re not comfortable sharing the log publicly, then when the language experts show up they can initiate a PM thread with you.

 
Thx,
Ann

Hello @Oodini, @Paul_Birtle

Thanks for the feedback, we created the ticket Should not fail if input file and project directory have different roots to fix the issue.
We’re making sure not to crash the secrets analysis in such a case and to better handle the exceptions. We’re releasing a fixed version which will be deployed to SonarCloud soon.

The workaround you mentioned sonar.text.inclusions.activate=false was a good choice.
This basically didn’t disable all of the secrets analysis for you, but only the part that was throwing the exception.

Best,
Jonas

1 Like

Issue done → problem solved.

Thanks !

This closed issue should also resolve [SONAR-14210] - Jira

I had a look into the ticket and unfortunately, in this case, the fix only applies to the logic inside the secrets analyzer and can’t be used for the root cause in SONAR-14210

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.