SonarCloudAnalyze in AzureDevops started failing - addImpact is not supported

  • ALM used: Azure DevOps

  • CI system used: Azure DevOps

  • Scanner command used: task: SonarCloudAnalyze@3

  • Languages of the repository: C#

  • Error observed

##[error]ERROR: Error during SonarScanner execution
java.lang.UnsupportedOperationException: addImpact is not supported on external issues
	at org.sonar.api.batch.sensor.issue.internal.DefaultExternalIssue.addImpact(DefaultExternalIssue.java:58)
	at org.sonarsource.dotnet.shared.plugins.SarifParserCallbackImpl.setExternalIssueSeverityAndType(SarifParserCallbackImpl.java:196)
	at org.sonarsource.dotnet.shared.plugins.SarifParserCallbackImpl.createExternalIssue(SarifParserCallbackImpl.java:179)
	at org.sonarsource.dotnet.shared.plugins.SarifParserCallbackImpl.onIssue(SarifParserCallbackImpl.java:171)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.handleResultFileElement(SarifParser10.java:178)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.handleLocationsElement(SarifParser10.java:146)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.handleIssue(SarifParser10.java:113)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.handleIssues(SarifParser10.java:96)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.accept(SarifParser10.java:66)
	at org.sonarsource.dotnet.shared.sarif.SarifParser10.accept(SarifParser10.java:38)
	at org.sonarsource.dotnet.shared.plugins.RoslynDataImporter.importRoslynReports(RoslynDataImporter.java:58)
	at org.sonarsource.dotnet.shared.plugins.sensors.DotNetSensor.importResults(DotNetSensor.java:111)
	at org.sonarsource.dotnet.shared.plugins.sensors.DotNetSensor.execute(DotNetSensor.java:82)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:63)
	at org.sonar.scanner.sensor.ProjectSensorsExecutor.execute(ProjectSensorsExecutor.java:40)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:160)
	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:414)
	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:128)
	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:58)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
	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(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)


  • Steps to reproduce -Run a c# build using sonarcloud
  • Potential workaround - None found at the moment
5 Likes

We see the same issue across multiple Azure DevOps tenants

The SonarQube Cloud Prepare task reports versions:

[INFO] SonarQube Cloud: Server version: 8.0.0.62884
[INFO] SonarQube Cloud: Server version: 8.0.0.62904

Not all dotnet solutions fails on this but looks like the ones that does keep failing on re-run

1 Like

Hey all.

Thanks for the report. I have reported the incident internally. Hold tight.

4 Likes

Same issue

INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.11 Eclipse Adoptium (64-bit)

Azure Devops extension: SonarQube Cloud 3.3.0

We are currently reverting the version of our C# analysis that was deployed around 13h (CEST). I will keep you posted.

2 Likes

The revert is still in progress. The deployment will start soon. :folded_hands: Sorry for the disruption.

2 Likes

The deployment should now be completed. Please don’t hesitate to post if you’re still facing the issue.

6 Likes

Thank you, I can confirm it’s working again for us.

2 Likes

Hi Colin,

The revert also worked for us, thanks! I was wondering if it’s possible to pin to a version to avoid upstream changes like this? Currently we use AzureDevops for our CICD and we use SonarCloudAnalyze@3 and SonarCloudPrepare@3 task definitions for this, where the SonarCloudAnalyze task produced the issue referred to in this thread.

Hey @rob.z

The issue was not with the extension, but with the version of the analyzer deployed to SonarQube Cloud that is downloaded by the extension (by the underlying scanner). It is not possible to pin a specific analyzer version to be downloaded by the scanner.

1 Like