RunCode analysis steps fails in DevOps

Hi,

RunCode analysis step fails on CI/CD DevOps pipelines.
It worked fine for weeks but in the last two days it started failing.

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)

##[error]at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)

at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)

at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)

##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)

at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)

##[error]at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)

at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57)

##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51)

at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)

##[error]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 java.base/java.lang.reflect.Method.invoke(Method.java:568)

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)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)

at org.sonarsource.scanner.cli.Main.execute(Main.java:126)

at org.sonarsource.scanner.cli.Main.execute(Main.java:81)

at org.sonarsource.scanner.cli.Main.main(Main.java:62)

ERROR:

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 java.base/java.lang.reflect.Method.invoke(Method.java:568)

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)

at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)

at org.sonarsource.scanner.cli.Main.execute(Main.java:126)

at org.sonarsource.scanner.cli.Main.execute(Main.java:81)

at org.sonarsource.scanner.cli.Main.main(Main.java:62)

ERROR:

##[error]The SonarScanner did not complete successfully

The SonarScanner did not complete successfully

##[error]08:40:12.362 Post-processing failed. Exit code: 1

08:40:12.362 Post-processing failed. Exit code: 1

##[error]The process 'D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.40.2\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1

Hi,

Can we have the full analysis log? This snippet don’t provide enough information.

 
Thx,
Ann

Hi,

Detailed log with diagnostics enabled:
raw log.txt (65.1 KB)

Thanks,
Robert

Hi Robert,

Thanks for the logs. You say analysis was working fine until a few days ago. From the error, this looks like a problem understanding the code. Do you have any idea what changed in the code just before the failure started?

 
Thx,
Ann

Hello,

It’s a solution including two web apps, one WebAssembly and the other one Blazor Server. I don’t think there is a change in the code causing this, as you can see in the bellow image the errors started in a random way.

The step sending the results to SonarCloud doesn’t fail but there are no new results there since 22nd of November.

Thanks,
Robert

Hi Robert,

I think we probably deployed .razor/Blazor analysis recently on SonarCloud. Could you try disabling Razor analysis (Administration → Languages → C# → Analyze Razor Code) and see if this gets better?

 
Ann

Hi Ann,

The error is still occuring, attached the raw log.
raw log.txt (53.4 KB)

Thanks,
Robert

Thanks Robert,

I’ve flagged this for more expert eyes.

 
Ann

1 Like

Hello @robertprofeanu,

According to the logs, there is an java.lang.IllegalArgumentException: Overlapping symbol declaration and reference for symbol at Range[from [line=5, lineOffset=0] to [line=5, lineOffset=7]] in the end step of the analysis. This looks a lot like this Error with net 8 on Azure DevOps: Overlapping symbol declaration and reference for symbol at Range.
We have created a ticket on GitHub with more details. This issue is caused by problems in the mapping of locations of the razor code generated by the compiler back to the razor file. You can avoid the issue by turning off the analysis for Razor as described here until we fix it.

Hello,

The issue still occurs for me if I stop the Razor page analysis at the project level.
We will wait to see if it still occurs once the issue is fixed.

Thanks,
Robert