After SonarQube Upgrade Azure DevOps Builds are failing on Run Code Analysis

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube 8.3.1
  • what are you trying to achieve
    I am trying to run SonarQUbe Analysis
  • what have you tried so far to achieve this

Yesterday I had upgrade SonarQube from 6.7.4 to 8.3.1, after upgrade when I try to run Azure DevOps(On Prem) SonarQube Builds are failing for all the branches except for master branch they are running successfully without any issues .
Below is the error which I am seeing:
22:46:51.039 ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:66)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)

Hi @Kpavan.Scm

Are you using SonarQube Community Edition ?

Yeah , we are using community edition

So that’s normal, branches analysis came with the 7.2 version of SonarQube, that’s the reason why with your huge gap upgrade you have this behavior, you will have to use at least the Developer Edition to analyze branches and pull requests.

Thanks for reply Caro , So apart from using Developer edition do we have any workaround or other way to work with other branches with this community edition

You can add a condition on the Run Code Analysis task, limiting it to uniquely run on master.

Thanks Caro .
As per my understanding , we can only do sonarqube scan for master branch with 8.3.1 community edition and if we want to have branch analyis, PR then need to have Developer edition right?

That’s right yes !