We have integrated SonarQube Analysis into our Azure DevOps Pipeline, which was functioning correctly until 2024.08.05. However, starting from 2024.08.06, the pipeline began failing consistently after exactly 1 minute with the following error message:
The failure coincides with an upgrade from SonarQube version 6.3.1 to 6.3.2. Prior to the upgrade, everything was working smoothly.
Reverting the task version to 5.* resolves the issue, but this version is deprecated, and we would prefer to use the latest version.
Given the circumstances, it seems unlikely that this issue is related to firewall or authentication, as the error occurs consistently at the 1-minute mark, suggesting a potential timeout problem.
I verified the version endpoint, and it is accessible via my browser, returning version 9.9.6.92038 without issue.
Environment:
We are using Microsoft Hosted Agents with the Windows Latest agent.
The pipeline is configured with the âIntegrate with MSBuildâ option in the SonarQube prepare task for a .NET 6.0 Web API project.
Steps Taken:
Attempted to use older versions in the Scanner MSBuild Version input.
Tried updating NodeJS and Java versions within the pipeline.
Reverted to the 5.* version of the DevOps task, which successfully completed the pipeline.
Request:
We need assistance in identifying and resolving the issue with SonarQube version 6.3.2 to ensure our pipelines can run successfully with the latest version.
I managed to find the source of the problem. The task fails in this file at line 24.
I found the Pull Request where the version of the task was increased to 6.3.2. and it includes the node-fetch package update from 2.7.0 to 3.3.2. The 5.* version of the Prepare Analysis task works, because it uses the 2.7.0 node-fetch version. It seems the 3.3.2 version of the node-fetch package has an issue.
We experience the same problem. What is interesting is that with the Task version 5.x it works fine but with 6.x we get operation aborted after 1 minute.
##[debug][SQ] API GET: â/api/server/versionâ with full URL "https://***/api/server/version" and query âundefinedâ
##[debug]Not using a proxy agent
##[debug][SQ] API GET â/api/server/versionâ failed, error is The operation was aborted.
##[warning]Error while executing SonarQube:Prepare task: [SQ] API GET â/api/server/versionâ failed, error is The operation was aborted.
##[debug]Processed: ##vso[task.issue type=warning;]Error while executing SonarQube:Prepare task: [SQ] API GET â/api/server/versionâ failed, error is The operation was aborted.
##[debug]task result: Failed
URL is correct (I have replaced it with *** but it is the correct URL there), I even tried to run a PowerShell script by the pipeline to call the same URL and the version is returned.
It is not self hosted, a windows-latest Azure agent.
Some additional information to the issue:
On 5 August it was working with version 6.3.1 but failed the following day with version 6.3.2. Can it be related to the node-fetch update?
For packet tracing, I would need to raise an internal ticket to our IT team, I would like to keep that as the last option.
We also have the same problem on our side with this version. In graphics pipelines we cannot specify a minor version and we had no choice but to revert to version 5 which is deprecated and displayed a warning when using it.
But we managed to configure our yaml pipelines to use version 6.3.1. Which does not solve the problem since version 6.3.2 still does not work.
Curl is working, just as when I tried with PowerShell earlier. The âworkaroundâ of @TADIE_Denis_Laurel is also working, version 6.3.1 seems to be able to connect.
Here is an update on this thread: We started an effort this week to harden the extension and we will try to mitigate this issue. Refer to this ticket for updates in our progress. You can reasonibly expect the fix to be released next week in the next weeks.
At the meantime, if you find time to send the information that I mentioned in my previous post, please do as it can help reproduce the issue:
Pipeline definition
Debug logs for the failing prepare task
Tell me whether you are using a proxy and how (Agent.ProxyURL, HTTP[S]_PROXY env variable, âŚ)
It looks like there was a regression in node-fetch that we can not identify. The version of this library will be reverted in the next release that we will do, and we moved to axios for the next major version of tasks we will release (SonarQube@7 and SonarCloud@3). Hopefully, this solves your issue entierely and you can upgrade to V7 when it comes out,
FYI, the release date has been pushed to the week of 14th October,
Thank you all for your patience and your help,
Benjamin