Sonarqube - gradle - stash/bitbucket problem

sonarqube
gradle
(Don Marek) #1

Hello,
from few days I have a problem like this below. Sonar doesn’t comment bitbucker pull requests. I didn’t change anything for weeks. I checked user permissions, stash url.
Meaby it is caused by this ‘Received response with type text/html;charset=utf-8 instead of JSON’ ??
Any help will be helpfull for me.
Thanks

  • versions used: 2.6
  • error observed:
    16:48:01 [2019-05-14T14:48:01.315Z] java.lang.invoke.LambdaMetafactory 16:48:05 [2019-05-14T14:48:05.560Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:05 [2019-05-14T14:48:05.827Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:05 [2019-05-14T14:48:05.827Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-mdpi/ic_launcher.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:05 [2019-05-14T14:48:05.827Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-hdpi/ic_launcher_round.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:07 [2019-05-14T14:48:07.745Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:07 [2019-05-14T14:48:07.746Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-hdpi/ic_launcher.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:08 [2019-05-14T14:48:08.685Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-mdpi/ic_launcher_round.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:08 [2019-05-14T14:48:08.685Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xhdpi/ic_launcher.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:09 [2019-05-14T14:48:09.266Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xxhdpi/ic_launcher.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:10 [2019-05-14T14:48:10.212Z] Invalid character encountered in file /opt/jenkins-slave/workspace/WA/CORE_PullRequest_pipeline/WA_CORE_PullRequest_pipeline/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png at line 1 for encoding UTF-8. Please fix file content or configure the encoding to be used using property ‘sonar.sourceEncoding’. 16:48:12 [2019-05-14T14:48:12.125Z] Unable to get SonarQube reviewer from Stash 16:48:12 [2019-05-14T14:48:12.125Z] org.sonar.plugins.stash.exceptions.StashClientException: Received response with type text/html;charset=utf-8 instead of JSON 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.extractResponse(StashClient.java:392) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.formatStashApiError(StashClient.java:404) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.validateResponse(StashClient.java:379) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.performRequest(StashClient.java:363) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.get(StashClient.java:310) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.client.StashClient.getUser(StashClient.java:219) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.StashRequestFacade.getSonarQubeReviewer(StashRequestFacade.java:363) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.StashIssueReportingPostJob.updateStashWithSonarInfo(StashIssueReportingPostJob.java:81) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.plugins.stash.StashIssueReportingPostJob.execute(StashIssueReportingPostJob.java:58) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.postjob.PostJobWrapper.executeOn(PostJobWrapper.java:58) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:66) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.phases.PostJobsExecutor.execute(PostJobsExecutor.java:55) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:94) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:177) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) 16:48:12 [2019-05-14T14:48:12.125Z] at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:291) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:286) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:264) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:48:12 [2019-05-14T14:48:12.126Z] at java.lang.reflect.Method.invoke(Method.java:498) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) 16:48:12 [2019-05-14T14:48:12.126Z] at com.sun.proxy.$Proxy119.execute(Unknown Source) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) 16:48:12 [2019-05-14T14:48:12.126Z] at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:99) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 16:48:12 [2019-05-14T14:48:12.126Z] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 16:48:12 [2019-05-14T14:48:12.126Z] at java.lang.reflect.Method.invoke(Method.java:498) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:780) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:747) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:121) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 16:48:12 [2019-05-14T14:48:12.126Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:110) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:108) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:61) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:60) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:97) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:87) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) 16:48:12 [2019-05-14T14:48:12.127Z] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:626) 16:48:12 [2019-05-14T14:48:12.128Z] at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:581) 16:48:12 [2019-05-14T14:48:12.128Z] at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) 16:48:12 [2019-05-14T14:48:12.128Z] at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) 16:48:12 [2019-05-14T14:48:12.128Z] at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) 16:48:12 [2019-05-14T14:48:12.128Z] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 16:48:12 [2019-05-14T14:48:12.128Z] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 16:48:12 [2019-05-14T14:48:12.128Z] at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) 16:48:12 [2019-05-14T14:48:12.128Z] at java.lang.Thread.run(Thread.java:748) 16:48:12 [2019-05-14T14:48:12.128Z] 16:48:12 [2019-05-14T14:48:12.128Z] Process stopped: No SonarQube reviewer identified to publish to Stash the SQ analysis
(Simon Brandhof) #2

Hi Don,

Which Stash plugin is installed? If it’s https://github.com/AmadeusITGroup/sonar-stash?

++

(Don Marek) #3

Ok I solved this. I was receiving error 500 (txt/html) because of wrong proxy configuration.

Can be closed

1 Like
(Simon Brandhof) #4

Thanks for the follow-up.