SonarQubePrepare@5 Task get stuck on macOS 12 Azure Devops agent


We are running some pipelines on Azure Devops with a regular SonarQube (8.9.9) analysis using the official SonarQube tasks. Now we ran into some trouble with the SonarQubePrepare@5 Task:

Since Thursday, February 9th, the pipelines building our mobile application that run on the image macOS-12 are getting stuck while using the task SonarQubePrepare@5 (5.11.1).

- task: SonarQubePrepare@5
    SonarQube: sonarqube

This is the step where the pipelines are simply becoming idle with no more log output or anything that points out what the task is trying to do, or if it runs into a timeout etc. The last output we get is:

##[debug][SQ] API GET: '/api/server/version' with query 'undefined'

Usually the task should output the HTTP status code and the SonarQube server version, which should be We added some curl commands to check if the server respectively the REST API is reachable and this was successful.

Since this day, February 9th, the version of the macOS-12 image points to 20230205.1, previously it was 20230125.4. As we compared those versions (…macOS-12/20230125.4) we found some possible sources of error like pip or openvpn, without any luck so far.

On the Ubuntu image this is working as expected. The issue only occurs on macOS-12. At this point we are running out of ideas on how to proceed with this issue as it is simply not telling us what is wrong when running on macOS-12.

Looking forward to hear from you.
Kind regards

1 Like

v5.11.1 did introduce a change in how the version is parsed (VSTS-298 fix version comparison (#247) · SonarSource/sonar-scanner-vsts@dfb1520 · GitHub) because we started development of 10.0.0… I’m a little jittery that we don’t seem to have a test for the v8.x series in there… but I can’t say for sure this is linked!

I’ve flagged this for attention.

:warning: Make sure you upgrade to SonarQube v9.9 LTS soon, not only to benefit from our Best LTS Ever™, but because soon we will systematically ask users to upgrade when they ask questions about earlier versions of SonarQube, which are now considered unsupported. :smiley:

1 Like

A quick update from our side:

We have updated our SonarQube instance to 9.9 and unfortunately still experience the same issue. There is even a newer macOS image (runner-images/ at releases/macOS-12/20230214 · actions/runner-images · GitHub)

Since a simple curl call to /api/server/version is successfull and only the API call in the SonarQubePrepare@5 gets stuck we believe it could be an issue of how the plugin is handling the authentication.

As I wrote in the initial post the debug output of line 11 is printed out but not the error logs after the request.

Hi Colin, another Update.

We’ve tested the analysis with the SonarScanner CLI and skipped the SonarQubePrepare@5 task entirely. This works as expected but it’s not so convenient to configure the CLI command as it was with the prepare task. We would like to use the Service Connection from Azure instead of storing the host and token separately.

Maybe there is indeed something wrong with the latest change you mentioned: VSTS-298 fix version comparison (#247) · SonarSource/sonar-scanner-vsts@dfb1520 · GitHub

But it is still weird that this happens only on macOS agents. Maybe some parsing issues? We already invest a lot of time for the investigation and would love to here from you. But we are also happy to support you in fixing the issue. It seems that there is nothing we can do from our side for now.

So our solution is to use the CLI and configure the command as necessary depending on the reason for the analysis (Pull Request or Branch)