Sonarcloud analysis has started failing for azure devops with token invalid

All sonarcloud runs have started failing with a 401 Azure Devops Token invalid since earlier today.

  • ALM used: Azure Devops

  • CI system used: Azure Devops

  • Scanner command used when applicable: Azure Devops analyse task

  • Languages of the repository: Impacting all projects (dotnetr core, python, typescript )

  • Error observed:

14:22:20.562 DEBUG: GET 200 https://sonarcloud.io/api/project_branches/list?project=#####| time=24ms
14:22:20.569 INFO: Load project branches (done) | time=32ms
14:22:20.575 INFO: Check ALM binding of project '#####'
14:22:20.591 DEBUG: GET 200 https://sonarcloud.io/api/alm_integration/is_project_bound?project=#####| time=15ms
14:22:20.593 INFO: Detected project binding: BOUND
14:22:20.594 INFO: Check ALM binding of project '#####' (done) | time=19ms
14:22:20.597 INFO: Load project pull requests
14:22:20.766 DEBUG: GET 200 https://sonarcloud.io/api/project_pull_requests/list?project=#####| time=168ms
14:22:20.778 INFO: Load project pull requests (done) | time=181ms
14:22:20.781 INFO: Load branch configuration
14:22:20.782 DEBUG: Found manual configuration of branch/PR analysis. Skipping automatic configuration.
14:22:20.981 DEBUG: GET 401 https://sonarcloud.io/api/alm_integration/show_pullrequest?project=#####&pullrequestKey=####|# time=198ms
14:22:20.991 INFO: ------------------------------------------------------------------------
14:22:20.991 INFO: EXECUTION FAILURE
14:22:20.991 INFO: ------------------------------------------------------------------------
14:22:20.991 INFO: Total time: 22.718s
14:22:21.022 INFO: Final Memory: 7M/30M
14:22:21.022 INFO: ------------------------------------------------------------------------
##[error]14:22:21.022 ERROR: Error during SonarScanner execution
##[debug]Processed: ##vso[task.logissue type=error;]14:22:21.022 ERROR: Error during SonarScanner execution
14:22:21.022 ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore
##[debug]Processed: ##vso[task.logissue type=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.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
...snip...
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
	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)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
	... 34 more
Caused by: The Azure DevOps access token is not valid
  • Steps to reproduce:
    Happens on any run

  • Additional notes:
    This was working until earlier today
    I have confirmed the following:

  • Token is not expired within ADO
  • Token is able to be used to query the azure devops API for PR/Code related issues
  • Have tried a token with full permissions to rule this out

Iā€™m unsure on how to proceed with debugging this, or if it might be an issue on the sonarcloud side.

3 Likes

Hello @obowersa,

Can you tell me if you have set the token on the project level or the organization level?

Can you tell me what do you see in your organization settings? Is the token marked as valid?

Best,
Marcin