Analyzer results are not sent to sonarcloud.io

Greetings, I have encountered the following issue.

The analyzer successfully detects warnings, and all the tasks pass, but the warnings are not displayed at https://sonarcloud.io/ dashboard. When investigating task URL from logs (https://sonarcloud.io/api/ce/task?id=AX2Ux5ojizZ4FnCsnl2Q), the warnings properties are empty:

"warningCount":0,"warnings":[]

The only analyzer-related log entry with an error that I could observe is this one:

  CompilerServer: server failed - server rejected the request due to analyzer / generator issues 'analyzer assembly 'C:\Users\de9t0101\AppData\Local\Temp\.sonarqube\resources\26\System.Buffers.dll' has MVID '36e84b0d-9d74-4086-a062-54e1963f24d5' but loaded assembly 'System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' has MVID 'f389ca43-32bf-4e24-ad8c-a6ed5efddff3', analyzer assembly 'C:\Users\de9t0101\AppData\Local\Temp\.sonarqube\resources\26\System.Numerics.Vectors.dll' has MVID '95de52ab-0179-450a-9f6f-08d224d60b15' but loaded assembly 'System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '34905ed1-db9d-4250-b31b-b80e1ff70ff5', analyzer assembly 'C:\Users\de9t0101\AppData\Local\Temp\.sonarqube\resources\26\System.Runtime.CompilerServices.Unsafe.dll' has MVID 'bd600ba8-23b5-4d45-ba63-f24457fa3be3' but loaded assembly 'System.Runtime.CompilerServices.Unsafe, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' has MVID '9dde2c5e-b52a-4cbd-861e-9aacf36593ce'' - 31059bf5-0165-4483-b92c-d0066d957f4c

But this error should not prevent analyzer from sending warnings to the dashboard, as far as I understand.

I’ve tried adding updated NodeJS (14.17.1) before SonarCloudPrepare, using MSBuild@1 instead of VSBuild@1, adding pollingTimeoutSec: '300' to SonarCloudPublish@1 - non of these helped.

Also, I’ve ensured that the result warnings are present as json files in \.sonarqube\out, and there were no log errors indicating problems with sending data to https://sonarcloud.io (the pipeline was run with Enable system diagnostics and sonar.verbose=true sonar.debug=true were set for SonarCloudPrepare@1)

Can you please advise?

  • ALM used - Azure DevOps
  • CI system used - Azure DevOps
  • Scanner command used:
task: SonarCloudPrepare@1
    displayName: 'Prepare analysis on SonarCloud'
    inputs:
        SonarCloud: 'sonarcloud'
        organization: '$(sonarcloudOrganization)'
        projectKey: '$(sonarcloudProjectKey)'
        projectName: '$(sonarcloudProjectName)'
        scannerMode: 'MSBuild'
        extraProperties: |
            sonar.exclusions=$(sonarExclusions)
            sonar.verbose=true
            sonar.debug=true
  • Languages of the repository - C#, JS, TS

Hey there.

What do you see in SonarCcloud that makes you think the results weren’t set? Can you share a screenshot?

The results on the dashboard look like this:

The end of build task log has this entry:

 703 Warning(s)
    0 Error(s)

SonarCloudAnalyze@1 run log has entries like this:
13:01:47.998 The supplied Code Analysis ErrorLog file is a valid json file and does not need to be fixed: D:\TTSAgent01\_work\986\.sonarqube\out\0\Issues.json

And those json files have warnings from Sonar.

Hey there.

Take a look at this thread here:

Thanks for the solution!
I think, it would be nice if there will be an option to forcefully report all coverage for a short-lived branch, so it would be easier to test how the analysis runs without merging changes to a develop branch.

The “Estimated After Merge” figure shown in the overview should give you an idea of what coverage looks like for the entire branch, although you won’t be able to drill into details

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