"The requested security protocol is not supported." -- Azure DevOps task fails after extension update

Hi,

Since this morning and the upgrade of azure devops sonar cloud extension, every use of SonarCloudPrepare task ends up like that:

SonarScanner for MSBuild 5.5
Using the .NET Framework version of the Scanner for MSBuild
Pre-processing started.
Preparing working directories...
15:39:50.37  Updating build integration targets...

##[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)
   at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__9.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.BootstrapperClass.<Execute>d__8.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.Program.<Execute>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SonarScanner.MSBuild.Program.<Main>(String[] args)
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)
   at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__9.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.BootstrapperClass.<Execute>d__8.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.Program.<Execute>d__4.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.Program.<Execute>d__3.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.Program.<Main>d__2.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.Program.<Main>(String[] args)
##[error]The process 'F:\agent02\_work\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.25.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 3762504530
Finishing: SonarCloudPrepare

6 Likes

Hi,
same error pop out in our Azure Pipelines. Is this a known issue? Any help would be appreciated.

Thank you
Fabio

1 Like

Hello,

We are also experiencing the same error code and messaging since last update.

Since the implicit download of the latest version we have 100% failed runs. Could not find any additional verbose logs to further the troubleshooting.

1 Like

Hi

We are also experiencing the same error code and messages since this update.

Thanks

Ian

We are experiencing the same issues with the last update. No workarounds that I have been able to find and pipelines are failing 100% of the time

We are also experiencing this issue with version 4.27.0 and 5.3.0 of the Prepare Analysis Configuration task. Downgrading back to version 4.26.0 worked for us.

We are also experiencing this issue. It occurs on all builds that integrate with MSBuild. Those that use a standalone scanner or Maven seem to be fine.

Any update here ?

Same here, i’m using Azure Devops with Sonar Cloud.

Encountered the same issue also. I’m using Azure DevOps with SonarQube task in the pipeline. The version was upgraded from 5.2.0 to 5.30. It was working yesterday using 5.2.0. There is no workaround right now and we can’t also perform downgrade to v4 since we are using Azure Git as repository which is not supported by SonarQube v4. Please provide a solution since 100% of our build is currently impacted and we can’t perform any deployment right now due to this issue

Just to add a voice: we’re also experiencing the same issue on our environment, using Azure Devops Pipeline integration and self-hosted build servers.

Hi there,

Sorry to hear that, we’re reverting the extension right now, then update it again with a proper fix.

Sorry for the incovenience.

Mickaël

Still experiencing the same issue, does the fix take some time to rollout?

Hi,

Extension is rolling out currently, it can take some time for some reasons, but i expect you should have it anytime soon.

Mickaël

Hi Jeffrey,
meantime that the impacted change is reverted, can you please share how you downgraded to 4.26.0? I tried appending the version at the task (after the @) but the pipeline fails.

Thank you

@xsurfer if you are hosting you own Azure DevOps server, you can still uninstall manually the extension, and reinstall it by providing the vsix (you can find them here : https://github.com/SonarSource/sonar-scanner-vsts/releases)

But as i said, roll out of the bugfix in ongoing, you should have the new version soon.

Mickaël

Got it, and unfortunately that option won’t apply to us.
Anyway I see now my pipelines running properly.

Thanks @mickaelcaro for your help!

1 Like

Hey Mickaël,

We are using version 4.27.0 and started getting this error. Our pipelines target @4. Has the version 4 task been rolled back also?

Thanks for your help.

Now version sq prepare 4.27.1.
Works fine

It’s upgraded a couple minutes ago