SonarAnalyze error in Azure Devops CI

Hi,

We have suddenly started seeing error while Sonar analyzes the Pull requests in Azure DevOps. We are having nodejs, javascript, react application. Sonar analyze works fine when directly run on the branch (as opposed to the scan which runs as part of the PR quality gate in Azure DevOps)

The error starts with the following:

GET 404 https://sonarcloud.io/api/alm_integration/show_pullrequest?project=&pullrequestKey=5876

This is followed by many lines of error (initial lines are)

##[error]06:40:40.091 ERROR: Error during SonarScanner execution

06:40:40.091 ERROR: Error during SonarScanner execution

##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore

java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore

##[error]at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)

at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)

##[error]at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)

##[error]at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)

Please advice on the cause/resolution.

Thanks

Hey there.

Have you configured a valid token at either the project-level Administration > General Settings > Pull Requests) or at the organiztion-level (Administration > Organization settings > Azure DevOps connectivity management)?

Often, this token expiring is the root cause.

Colin

Hi,

I have refreshed my PAT in Azure DevOps and configured it in Sonar project level ( Administration > General Settings > Pull Requests->Integration with Azure DevOps Services. I have once again regenerated my Sonar token (from Security screen) and configured it in my Azure DevOps service connection for Sonar.

However, still I get error when Sonar is run as a quality gate in Pull Requests. Sonar analysis on manual run of the pipeline runs fine.

Please suggest what I might be missing

Thanks

I’ve sent you a PM for some private details.