- ALM used -GitLab
- CI system -Gitlab
- Scanner command used when applicable - ‘’‘dotnet-sonarscanner begin /k:“${CI_PROJECT_ROOT_NAMESPACE}_${CI_PROJECT_NAME}” /o:“${CI_PROJECT_ROOT_NAMESPACE}” /d:sonar.token=“${SONAR_TOKEN}” /d:sonar.host.url=“${SONAR_HOST_URL}” /d:sonar.qualitygate.wait=true /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml ‘’’
- Languages of the repository - Dot Net
- Only if the SonarCloud project is public, the URL
- And if you need help with pull request decoration, then the URL to the PR too
- Error observed ‘’‘Failed to request and parse ‘https://sonarcloud.io/api/qualityprofiles/search?project=XYZ_PROJECTNAME&organization=XYZ’: Response status code does not indicate success: 403 ()
Unhandled exception. System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 ().
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at SonarScanner.MSBuild.PreProcessor.WebClientDownloader.TryDownloadIfExists(Uri url, Boolean logPermissionDenied)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass7_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
at SonarScanner.MSBuild.PreProcessor.SonarWebService.ExecuteWithLogs[T](Func1 request, Uri logUri) at SonarScanner.MSBuild.PreProcessor.SonarWebService.TryGetQualityProfile(String projectKey, String projectBranch, String organization, String language) at SonarScanner.MSBuild.PreProcessor.PreProcessor.FetchArgumentsAndRuleSets(ISonarWebService server, ProcessedArgs args, BuildSettings settings) at SonarScanner.MSBuild.PreProcessor.PreProcessor.DoExecute(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, ILogger logger)
at SonarScanner.MSBuild.Program.Execute(String args)
at SonarScanner.MSBuild.Program.Main(String args)
at SonarScanner.MSBuild.Program.(String args) ‘’’
Same script was working in the previous pipelines but recently we observed that the sonar is failing with the above errors. We tried updating the security token but still the error is the same. Can you please share your inputs.