Run Code Analysis Failed and getting error in Azure devops pipline

It really appreciate if you help with it we are getting this for a long time

 INFO: ------------------------------------------------------------------------
 INFO: Analysis report generated in 2139ms, dir size=151.0 MB
 INFO: Analysis report compressed in 137899ms, zip size=45.9 MB
 INFO: EXECUTION FAILURE
 INFO: ------------------------------------------------------------------------
 INFO: Total time: 4:38.652s
 INFO: Final Memory: 20M/74M
INFO: ------------------------------------------------------------------------
4Z ##[error]ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Failed to upload report: Error 500 on http://http://Sonarurl/api/ce/*********************&characteristic=branchType%3DBRANCH&characteristic=branchType%3DBRANCH : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
2023-08-21T06:25:11.9602809Z ERROR: Error during SonarScanner execution
2023-08-21T06:25:11.9604885Z java.lang.IllegalStateException: Failed to upload report: Error 500 on http://http://Sonarurl/api/ce/*********************&characteristic=branchType%3DBRANCH&characteristic=branchType%3DBRANCH: {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
2023-08-21T06:25:11.9608101Z ##[error]at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:226)
	at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:154)
	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:376)
2023-08-21T06:25:11.9610216Z 	at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:226)
2023-08-21T06:25:11.9611329Z 	at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:154)
2023-08-21T06:25:11.9612398Z 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:376)
2023-08-21T06:25:11.9620557Z ##[error]at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
2023-08-21T06:25:11.9624217Z 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
2023-08-21T06:25:11.9624882Z 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
2023-08-21T06:25:11.9625526Z 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
2023-08-21T06:25:11.9626356Z 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
2023-08-21T06:25:11.9626999Z 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
2023-08-21T06:25:11.9627560Z 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
2023-08-21T06:25:11.9629918Z ##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
2023-08-21T06:25:11.9631488Z 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
2023-08-21T06:25:11.9632060Z 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2023-08-21T06:25:11.9632666Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-08-21T06:25:11.9633286Z 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
2023-08-21T06:25:11.9635158Z ##[error]at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2023-08-21T06:25:11.9636556Z 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-08-21T06:25:11.9637130Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
2023-08-21T06:25:11.9637676Z 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2023-08-21T06:25:11.9638934Z ##[error]at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2023-08-21T06:25:11.9640014Z 	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
2023-08-21T06:25:11.9640504Z 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2023-08-21T06:25:11.9641495Z ##[error]at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2023-08-21T06:25:11.9642399Z 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2023-08-21T06:25:11.9643541Z ##[error]at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
2023-08-21T06:25:11.9644481Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
2023-08-21T06:25:11.9644946Z 	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
2023-08-21T06:25:11.9647646Z ##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: org.sonarqube.ws.client.HttpException: Error 500 on http://http://Sonarurl/api/ce/*********************&characteristic=branchType%3DBRANCH&characteristic=branchType%3DBRANCH : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
	at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
2023-08-21T06:25:11.9650048Z 	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
2023-08-21T06:25:11.9650965Z Caused by: org.sonarqube.ws.client.HttpException: Error 500 on http://http://Sonarurl/api/ce/*********************&characteristic=branchType%3DBRANCH&characteristic=branchType%3DBRANCH: {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
2023-08-21T06:25:11.9651993Z 	at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
2023-08-21T06:25:11.9653880Z ##[error]at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:126)
	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:89)
	at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:224)
2023-08-21T06:25:11.9659216Z 	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.failIfUnauthorized(DefaultScannerWsClient.java:126)
2023-08-21T06:25:11.9659896Z 	at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:89)
2023-08-21T06:25:11.9660480Z 	at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:224)
2023-08-21T06:25:11.9661135Z ##[error]... 21 more
2023-08-21T06:25:11.9661736Z 	... 21 more
2023-08-21T06:25:11.9662192Z ##[error]ERROR:
2023-08-21T06:25:11.9662763Z ERROR: 
2023-08-21T06:25:12.5700696Z ##[error]The SonarScanner did not complete successfully
2023-08-21T06:25:12.5701879Z The SonarScanner did not complete successfully
2023-08-21T06:25:12.5909766Z ##[error]11:55:12.57  Post-processing failed. Exit code: 1
2023-08-21T06:25:12.5912085Z 11:55:12.57  Post-processing failed. Exit code: 1
2023-08-21T06:25:12.6379569Z ##[error]The process 'E:\Agent_SonarQube\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
2023-08-21T06:25:12.6479137Z ##[section]Finishing: Run Code Analysis

Hey there.

What version/edition of SonarQube are you using? Anything interesting in the logs?

I am using

  • Community Edition
  • Version 9.9.1 (build 69595)

2023.08.23 11:36:53 ERROR web[AYogwA8j6HkUe6vjAACz][o.s.s.w.WebServiceEngine] Fail to process request http://sonarURL/api/ce/submit?projectKey=API-Core&projectName=codetest&characteristic=branch%3Ddev&characteristic=branchType%3DBRANCH
java.lang.IllegalStateException: Current edition does not support branch feature
at com.google.common.base.Preconditions.checkState(Preconditions.java:502)
at org.sonar.server.ce.queue.BranchSupport.createComponentKey(BranchSupport.java:52)
at org.sonar.server.ce.queue.ReportSubmitter.submit(ReportSubmitter.java:81)
at org.sonar.server.ce.ws.SubmitAction.handle(SubmitAction.java:100)
at org.sonar.server.ws.WebServiceEngine.execute(WebServiceEngine.java:111)
at org.sonar.server.platform.web.WebServiceFilter.doFilter(WebServiceFilter.java:84)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:153)
at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:153)
at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:116)
at jdk.internal.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:584)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:176)
at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:137)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:136)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:81)
at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:68)
at jdk.internal.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:712)
at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:584)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘communityBranchPlugin’ version : 1.14.0 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘config’ version : 1.2.0.267 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘csharp’ version : 8.51.0.59060 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘flex’ version : 2.8.0.3166 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘go’ version : 1.11.0.3905 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘iac’ version : 1.11.0.2847 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘jacoco’ version : 1.3.0.1538 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘java’ version : 7.16.0.30901 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘javascript’ version : 9.13.0.20537 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘kotlin’ version : 2.12.0.1956 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘php’ version : 3.27.1.9352 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘python’ version : 3.24.0.10784 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘ruby’ version : 1.11.0.3905 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘sonarscala’ version : 1.11.0.3905 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘text’ version : 2.0.2.1090 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘vbnet’ version : 8.51.0.59060 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘web’ version : 3.7.1.3306 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘xanitizer’ version : 2.2.0 has not been found on the update center.
2023.08.23 13:34:44 INFO web[AYogwA8j6HkUe6vjAAC2][o.s.u.c.UpdateCenter] The plugin ‘xml’ version : 2.7.0.3820 has not been found on the update center.

There you go. :slight_smile:

While using Community Edition you should make sure analysis is only running on your default branch.

Branch analysis

Community Edition doesn’t support the analysis of multiple branches, so you can only analyze your main branch. Starting in Developer Edition, you can analyze multiple branches and pull requests.

Thanks for your input. But the question is previously we are using Community Edition

  • Version 7.9 and we are using only one branch as a default and its working

default branch

image

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9 → 8.9.10 → 9.9.1 → 10.1 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

Hi Colin,

Thanks again, for the info. If I use Developer Edition for my project may this fix the issue and error that occurring?

Developer Edition will allow you to analyze branches. It’s a great feature set!

And, upgrading should be your first step – as I think sometime in the last 3-4 years, we made it easier to analyze the default branch (when not named master) on Azure DevOps.

Hi,

Do you mean to say if we use our create branch? For example, I already sent a screenshot of the above
image

it not going to analyze our project in * Community Edition

  • Version 9.9.1 (build 69595)
    because it does not support in current community edition multiple-branch feature. Correct me if i wrong