Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to run sonarscan with dotnet sonarscanner tool #905

Open
auropay-bundles opened this issue Apr 30, 2024 · 1 comment
Open

Not able to run sonarscan with dotnet sonarscanner tool #905

auropay-bundles opened this issue Apr 30, 2024 · 1 comment

Comments

@auropay-bundles
Copy link

Sonarqube version - 9.9 LTS
Plugin version - 1.17.1

I am running below commands :

  1. dotnet sonarscanner begin /k:"testbranch" /d:sonar.host.url="host" /d:sonar.login="token" /d:sonar.branch.name="develop"
  2. dotnet build
  3. dotnet sonarscanner end /d:sonar.login="tpken"

I am getting below error:
java.lang.IllegalStateException: Failed to upload report: Error 500 on https://host/api/ce/submit?projectKey=testbranch&characteristic=branch%3Ddevelop&characteristic=branchType%3DBRANCH : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
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)
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)
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)
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)
at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: org.sonarqube.ws.client.HttpException: Error 500 on https://host/api/ce/submit?projectKey=testbranch&characteristic=branch%3Ddevelop&characteristic=branchType%3DBRANCH : {"errors":[{"msg":"An error has occurred. Please contact your administrator"}]}
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
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)
... 21 more
ERROR:
The SonarScanner did not complete successfully
07:04:29.257 Post-processing failed. Exit code: 1

This error occurs only when i give sonar.branch.name option, without this option the scan is working fine.

Would appreciate the help and support on this.

@xC0dex
Copy link

xC0dex commented May 6, 2024

Hey, regarding the Release notes, the plugin version 1.17.1 doesn't support SonarQube 9.9 LTS. You have to use 1.14.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants