Sonar Cloud Analysis 'failed with exit code null'

Hello, we’re using Azure DevOps Services to run our pipelines and recently the Sonar Cloud Analysis step started to fail with the following error:

##[error]The process '/azp/_work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.43.2/sonar-scanner/bin/sonar-scanner' failed with exit code null

We reviewed our pipeline and nothing changed. We’ve also checked all the tokens and PATS but the error persists. Also, when keep rerunning the pipeline sometimes it works just fine, so looks like an intermittent problem.

Any idea about what’s happening?

Update: we were using a self-hosted agent to run the analysis task. We’ve just changed to use the MS Hosted and the problem stopped. Maybe it’s something related to our self-hosted agent. Besides Java, is there anything else prerequisites to run the analysis?

Hi,

That depends a little on the languages and/or analyzers involved. The docs should help.

 
Ann