Open Flast1j opened 1 month ago
I'm getting the same error message "SonarQube failed to complete the review of this commit: Error 401" after trying to switch from sonar.login to sonar.token. If I switch back to sonar.login, then everything works fine.
SonarQube 10.7 Sonar_Gitlab_plugin 5.4.0 GitLab 17.1.8
I am also seeing this error. Will revert and use sonar.login until this is fixed. I think the module needs to be upgraded to 10+ for this to work:
pom.xml:
Hi all! I can't get a detailed comment in Gitlab Merge Request after analyzing the code. I get a response in the form of number of errors and that Quality Gate Failed. I tried different ways of code analysis and comment output.
SonarQube 10.6 Data Centr Sonar_Gitlab_plugin 5.4.0 GitLab 16.4
12:23:33.663 INFO: GitLab plugin is enabled 12:23:34.449 DEBUG: getPatchPositionsToLineMapping {20c41fc05203c2b0c18e392dd40e88fe4eb7dd61={.gitlab-ci.yml=[Line{number=19, content=' - sonar-scanner -X -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.token=$SONAR_TOKEN -Dsonar.projectKey=[MASKED] -Dsonar.gitlab.commit_sha=$CI_COMMIT_SHA -Dsonar.gitlab.url=[MASKED] -Dsonar.gitlab.user_token=glpat-[MASKED] -Dsonar.gitlab.ref_name=$CI_COMMIT_REF_NAME -Dsonar.gitlab.project_id=104 -Dsonar.gitlab.ci_merge_request_iid=$CI_MERGE_REQUEST_IID -Dsonar.gitlab.merge_request_discussion=true'}]}} 12:23:34.820 DEBUG: delta [ns] since modification FileSnapshot failed to detect count, failures, racy limit [ns], delta min [ns], delta max [ns], delta avg [ns], delta stddev [ns] 3114, 29, 22980, 657756.0, 1132527.0, 891545.6896551726, 150682.47960887427 12:23:34.821 DEBUG: FileStoreAttributes[fsTimestampResolution=9 µs, minimalRacyInterval=1,132 µs] 12:23:34.826 DEBUG: register org.eclipse.jgit.internal.storage.file.LockFile$$Lambda$914/0x00007e884f679b88@34f64484 with shutdown hook 12:23:34.826 DEBUG: unregister org.eclipse.jgit.internal.storage.file.LockFile$$Lambda$914/0x00007e884f679b88@34f64484 from shutdown hook 12:23:34.827 DEBUG: unregister org.eclipse.jgit.internal.storage.file.LockFile$$Lambda$914/0x00007e884f679b88@34f64484 from shutdown hook 12:23:34.884 INFO: ------------------------------------------------------------------------ 12:23:34.885 INFO: EXECUTION FAILURE 12:23:34.885 INFO: ------------------------------------------------------------------------ 12:23:34.885 INFO: Total time: 14.619s 12:23:34.960 ERROR: Error during SonarScanner execution SonarQube failed to complete the review of this commit: Error 401 on http://192.168.4.10:9000/api/ce/task?id=895f6601-9d16-452e-a3aa-e671c450819b : 12:23:34.960 INFO: Final Memory: 23M/112M 12:23:34.960 INFO: ------------------------------------------------------------------------ Caused by: org.sonarqube.ws.client.HttpException: Error 401 on http://192.168.4.10:9000/api/ce/task?id=895f6601-9d16-452e-a3aa-e671c450819b : at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36) at org.sonarqube.ws.client.BaseService.call(BaseService.java:55) at org.sonarqube.ws.client.BaseService.call(BaseService.java:50) at org.sonarqube.ws.client.BaseService.call(BaseService.java:45) at org.sonarqube.ws.client.ce.CeService.task(CeService.java:226) at com.talanlabs.sonar.plugins.gitlab.SonarFacade.getTask(SonarFacade.java:158) at com.talanlabs.sonar.plugins.gitlab.SonarFacade.getAnalysisId(SonarFacade.java:128) at com.talanlabs.sonar.plugins.gitlab.SonarFacade.loadQualityGate(SonarFacade.java:91) at com.talanlabs.sonar.plugins.gitlab.CommitPublishPostJob.execute(CommitPublishPostJob.java:90) at org.sonar.scanner.postjob.PostJobWrapper.execute(PostJobWrapper.java:49) at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:48) at org.sonar.scanner.postjob.PostJobsExecutor.execute(PostJobsExecutor.java:39) at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:188) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144) at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226) at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67) 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) 12:23:34.964 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$365/0x00007e884f2ae688@28d79cba during JVM shutdown ERROR: Job failed: exit code 1