Azure DevOps Prepare Analysis Error with upgrade to version 5.3.0

As of today, we are receiving the following error during the Prepare Analysis Configuration step using the Azure DevOps SonarQube Plugin. This started becoming a problem after the plugin automatically upgraded to version 5.3.0 in Azure DevOps Services (SaaS)

The error looks to be related to some sort of TLS settings, and possibly related to this change: Enable the usage of TLS 1.3 protocol by csaba-sagi-sonarsource · Pull Request #1152 · SonarSource/sonar-scanner-msbuild · GitHub. Can someone help us understand why this error is happening and what needs to happen to resolve it? All versions prior to 5.3.0 of the plugin ran successfully. As far as I can tell I cannot force the plugin back to a previous version.

Step output with error:

Starting: Prepare analysis on SonarQube
==============================================================================
Task         : Prepare Analysis Configuration
Description  : Prepare SonarQube analysis configuration
Version      : 4.27.0
Author       : sonarsource
Help         : Version: 4.27.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
[REDACTED]\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.27.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:[REDACTED]
SonarScanner for MSBuild 5.5
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
09:53:17.831  09:53:17.82  Loading analysis properties from [REDACTED]\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.27.0\classic-sonar-scanner-msbuild\SonarQube.Analysis.xml
09:53:17.831  09:53:17.831  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
09:53:17.835  Updating build integration targets...
09:53:17.839  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\4.0\Microsoft.Common.targets\ImportBefore
09:53:17.839  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\10.0\Microsoft.Common.targets\ImportBefore
09:53:17.839  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\11.0\Microsoft.Common.targets\ImportBefore
09:53:17.839  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\12.0\Microsoft.Common.targets\ImportBefore
09:53:17.84  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\14.0\Microsoft.Common.targets\ImportBefore
09:53:17.84  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\15.0\Microsoft.Common.targets\ImportBefore
09:53:17.84  The file SonarQube.Integration.ImportBefore.targets is up to date at [REDACTED]\MSBuild\Current\Microsoft.Common.targets\ImportBefore
09:53:17.845  Installed SonarQube.Integration.targets to [REDACTED]
09:53:17.846  Creating config and output folders...
09:53:17.847  Creating directory: [REDACTED]\.sonarqube\conf
09:53:17.848  Creating directory: [REDACTED]\.sonarqube\out

##[error]Unhandled Exception:
##[error]System.NotSupportedException: The requested security protocol is not supported.
   at System.Net.ServicePointManager.ValidateSecurityProtocol(SecurityProtocolType value)
   at SonarScanner.MSBuild.PreProcessor.SecurityProtocolHandler.set_SecurityProtocol(SecurityProtocolType value)
   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader..ctor(String userName, String password, ILogger logger, ISecurityProtocolHandler securityProtocolHandler, String clientCertPath, String clientCertPassword)
   at SonarScanner.MSBuild.PreProcessor.PreprocessorObjectFactory.CreateSonarQubeServer(ProcessedArgs args)
   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<DoExecute>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<Execute>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
4 Likes

We’re having the same issue, is there any update?

No update - there are multiple reports of this and no communication from SonarSource… not sure why they haven’t responded to any of the multiple reports of these issues considering how many users it seems to be impacting

Have you got any workaround?

Hi there,

Follow up happened in this other thread : SonarCloudPrepare task failed since upgrade from 1.28 to 1.29 - #18 by mickaelcaro

Let’s continue there, i’m closing this one.

Thank you.

Mickaël