Upgrading SonarScanner to 5.X will fail our Azure DevOps builds

Our Azure DevOps builds fail after the commits which upgrade the SonarScanner to 5.X

See:

After the update of the red lines; our builds started failing. After the black updates, our builds starting working again.

Version:
SonarQube: * Version 7.1 (build 11001) [Community]
SonarQube Azure DevOps extension: Always the latest (4.14.0 (Latest))

1 Like

Some more information; this is the error we see:

Starting: Prepare analysis on SonarQube
==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 4.14.0
Author       : sonarsource
Help         : Version: 4.14.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
<snip>\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:<snip>
SonarScanner for MSBuild 5.0.2
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
11:03:10.444  Updating build integration targets...
11:03:15.17  11:03:15.17  WARNING: Failed to fetch license status from server.
##[error]11:03:15.17  Your SonarQube instance seems to have an invalid license. Please check it. Server url : <snip>
11:03:15.17  Pre-processing failed. Exit code: 1
11:03:15.17  Your SonarQube instance seems to have an invalid license. Please check it. Server url : <snip>
11:03:15.17  Pre-processing failed. Exit code: 1
##[error]The process '<snip>\4.14.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
Finishing: Prepare analysis on SonarQube

Hi @Duracell1989

This should be fixed with version 4.15 of the extension.

Sorry for the inconvenience.

Mickaël

I can see the new version on my Azure DevOps instance,


However after manually removing the task from our build agents they still download the 4.14 version of the task
image
image

*** Update ***
This has updated on my build agents now :slight_smile: and I’m not seeing the problem anymore

Yes, I saw that a new commit has been done to revert the changes. Maybe don’t ‘test’ these upgrades on the main branch because it get’s automatically updated for everyone who is using this extension.
And I didn’t see any option to disable the automatic update of extensions in Azure DevOps; so, please be a bit more careful when merging to the main branch; because it hits a lot of people :slight_smile:

1 Like

I know, and bare with me, no one wants bug in production :wink:
Sorry for the incovenience.

1 Like

@mickaelcaro; Do I need to create an issue on: https://github.com/SonarSource/sonar-scanner-msbuild ?
Because, also using the SonarQube Scanner for MSBuild (5.x) manually gives the same error. Thus, the error isn’t in the VSTS/Azure DevOps extension, but it fails due to the underlying package.

Hi @Duracell1989

There’s already an issue (which has been reopened recently) for that ( https://github.com/SonarSource/sonar-scanner-msbuild/issues/917)

Mickaël

1 Like

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