Error on quality profiles page

Hello!

We are trialing the SonarQube Cloud service and are trying to integrate the scanner service into our Azure DevOps pipeline. Last week we were able to use the service while using the Automatic Analysis, but in order to add code coverage we want to integrate it into our pipeline.

The command I added to the pipeline looks as follows:

- task: SonarCloudPrepare@4
  inputs:
    SonarQube: 'SonarQube'
    organization: '<organization-name>'
    scannerMode: 'dotnet'
    projectKey: '<project-key>'
    projectName: '<project-name>'
    extraProperties: sonar.verbose=true

When I ran this command I got an error 500 from the API that retrieves quality-profiles:

	
11:16:11.394  Fetching quality profile for project '<project-key>'...
11:16:11.394  Downloading from https://sonarcloud.io/api/qualityprofiles/search?project=<project-key>&organization=<organization-name>...
11:16:11.684  Response received from https://sonarcloud.io/api/qualityprofiles/search?project=<project-key>&organization=<organization-name>...

##[error]Unhandled Exception:
##[error]System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 ().

The same error occurs when I try to use the command line from my local project:

PM> dotnet sonarscanner begin /o:"<organization-name>" /k:"<project-key>" /d:sonar.token="<token>"
SonarScanner for .NET 11.2.1
Using the .NET Core version of the Scanner for .NET
Pre-processing started.
Preparing working directories...
12:22:38.078  Updating build integration targets...
12:22:39.434  Using SonarCloud.
12:22:39.738  Fetching analysis configuration settings...
dotnet : Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 500.
At line:1 char:1
+ dotnet sonarscanner begin /o:"<organization-name>" /k:"<project-key> ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Unhandled excep...e success: 500.:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
   at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
   at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.TryDownloadIfExists(Uri url, Boolean logPermissionDenied)
   at SonarScanner.MSBuild.PreProcessor.WebServer.SonarWebServerBase.DownloadQualityProfile(String projectKey, String projectBranch, String language)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.FetchArgumentsAndRuleSets(ISonarWebServer server, ProcessedArgs args, BuildSettings settings)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.DoExecute(BuildSettings buildSettings, ProcessedArgs localSettings)
   at SonarScanner.MSBuild.PreProcessor.PreProcessor.Execute(IEnumerable`1 args)
   at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
   at SonarScanner.MSBuild.BootstrapperClass.Execute()
   at SonarScanner.MSBuild.Program.Execute(String[] args, IRuntime runtime)
   at SonarScanner.MSBuild.Program.Main(String[] args)
   at SonarScanner.MSBuild.Program.<Main>(String[] args)

When I open the page for quality profiles in my project, I get the message “An unexpected error occurred. Please try again later.”

What I’ve tried already:

  • Removed the project and re-added it
  • Created a new quality profile based on the “Sonar way” and excluded a rule which was marked as obsolete and set it as organization default
  • Created an empty quality profile and set it as organization default

I found some related topics to this problem which seemed to suggest database corruption, but since we are using the cloud service, I don’t think I can fix this myself.

Can somebody point me in the right direction on how to fix this issue?

I have same issue.