Hello, We’ve seen similar threads in the community regarding intermittent issues using the SonarcloudPrepare and SonarcloudPublish on Azure Devops runners.
Our experience is that since October 2025 the tasks have been unstable and almost unusable due to a high failure rate.
SonarCloudPrepare Task:
##[error][ERROR] SonarQube Cloud: Error while executing task Prepare: API GET '/api/server/version' failed. Error message: Error.
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;][ERROR] SonarQube Cloud: Error while executing task Prepare: API GET '/api/server/version' failed. Error message: Error.
##[debug]task result: Failed
##[error]API GET '/api/server/version' failed. Error message: Error.
SonarCloudPublish Task:
##[error][ERROR] SonarQube Cloud: API GET '/api/metrics/search' failed. Error message: .
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;][ERROR] SonarQube Cloud: API GET '/api/metrics/search' failed. Error message: .
##[error][ERROR] SonarQube Cloud: Error while executing task Publish: Could not fetch metrics
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;][ERROR] SonarQube Cloud: Error while executing task Publish: Could not fetch metrics
Mitigation - Enabled up to 10 retries over 7 minutes to allow the task to reach Sonarcloud.io to get the API version.
Investigation - We added logging to our DNS server incase we were failing to resolve your domain internally. We were able to resolve it each time.
Additionally, It was suggested in an earlier thread to curl endpoint outside of the task but within the same pipeline runner. We added it last month and we’ve never had a failure on it.
Curling - /api/server/version
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 11 100 11 0 0 10 0 0:00:01 0:00:01 --:--:-- 10
100 11 100 11 0 0 10 0 0:00:01 0:00:01 --:--:-- 10
8.0.0.78543
Curling - /api/metrics/search, It is a much larger response but the following example gets the idea across.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0{"metrics":[{"id":"419","key":"accepted_issues","type":"INT","name":"Accepted Issues","description":"Accepted issues","domain":"Issues","direction":-1,"qualitative":false,"hidden":false},{"id":"289","key":"new_technical_debt","type":"WORK_DUR","name":"Added Technical Debt","description":"Added technical debt","domain":"Maintainability","direction":-1,"qualitative":true,"hidden":false}
100 20125 0 20125 0 0 18431 0 --:--:-- 0:00:01 --:--:-- 18446
We’ve also tried rolling back to earlier versions of your Azure DevOps extension and we’re left with the same issues.
At the moment, We’ve disabled Sonarcloud until we can get the situation resolved. We’ve done everything possible to identify any configuration issues internally.
We are happy to provide any more information or try any further suggestions. Please let us know.
Thank you,
Have a good day.