The 'component' parameter is missing

Sonar quality gate in jenkins is throwing below error. It was running properly till last month now its throwing below error. Please check and help

org.quality.gates.jenkins.plugin.QGException: Expected status 200, got: 400. Response: {“errors”:[{“msg”:“The ‘component’ parameter is missing”}]}
at org.quality.gates.sonar.api.SonarHttpRequester.executeGetRequest(SonarHttpRequester.java:124)
at org.quality.gates.sonar.api.SonarHttpRequester.getComponentId(SonarHttpRequester.java:182)
at org.quality.gates.sonar.api60.SonarHttpRequester60.getSonarApiTaskInfoParameter(SonarHttpRequester60.java:39)
at org.quality.gates.sonar.api.SonarHttpRequester.getAPITaskInfo(SonarHttpRequester.java:145)
at org.quality.gates.sonar.api.QualityGatesProvider.getAPIResultsForQualityGates(QualityGatesProvider.java:62)
at org.quality.gates.jenkins.plugin.BuildDecision.getStatus(BuildDecision.java:24)
at org.quality.gates.jenkins.plugin.QGPublisher.perform(QGPublisher.java:85)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
at hudson.model.Run.execute(Run.java:1841)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step ‘Quality Gates Sonarqube Plugin’ marked build as failur

Hi,

Which plugin are you using ? Is that a custom one ?

Thanks.

using sonarcloud.io for analysis and sonar quality get in jenkins.

Quality Gates Plugin 2.5
Sonar Quality Gates Plugin 1.3.1
Jenkins 2.164.1

Having the same issue, has anyone found a solution?

Hi,

Some deprecated parameters have been remove recently, and the route called after analyzing the stack trace is one of.

As it is a 3rd party plugin, i suggest you to contact the developer directly, the repo seems here : https://github.com/jenkinsci/sonar-quality-gates-plugin

To request changes with newest implementation.

Thanks.

Mickaël

1 Like