Problem with sonarcloud accessing PR's since 2.10.2023

we have an error during trying to send scan results to sonnarcloud. Problems shows only on custom branches. It looks like sonar can’t download informations about PR’s:

##[error]12:13:50.956 ERROR: Error during SonarScanner execution
12:13:50.956 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(
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(
##[error]at org.picocontainer.DefaultPicoContainer.getComponent(
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(
	at org.picocontainer.DefaultPicoContainer.getComponent(
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(
##[error]at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(
##[error]at org.picocontainer.injectors.SingleMemberInjector.getParameter(
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(
##[error]at org.picocontainer.injectors.ConstructorInjector$
	at org.picocontainer.injectors.ConstructorInjector$
##[error]at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(
##[error]at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(
##[error]at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(
	at org.picocontainer.behaviors.Stored.getComponentInstance(
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(
	at org.picocontainer.behaviors.Stored.getComponentInstance(
##[error]at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(


Welcome to the community!

What do you mean by “custom” branches? What makes them custom?

Also, could you share the full analysis log, starting from the analysis command? That’ll let us better understand the context of the error.

Ann (46.8 KB)
Here you go


I’m seeing a 404 in your log:

Caused by: Could not find the pullrequest with key '7619'
Caused by: Error 404 on : {"errors":[{"msg":"Unable to find the pullrequest with key \u00277619\u0027"}]}

Many systems will return a 404 error (i.e. what you’ve asked for doesn’t exist) rather than a 403 error, thus admitting that the resource exists but you just don’t have access to it.

You should double-check the PAT you’ve configured SonarCloud with. Since all the problems trace to a particular day, it’s quite possible the old PAT expired right before that.


I switched the PAT to new one. I didn’t helped :confused:


Can you verify that a PR #7619 exists on the Azure(?) side?

Can you also verify that the new PAT you’re using has full permissions on the Spark_Ops project?


I created them myself and I am 100% sure Also I regenerated the PAT to do this.

1 Like


Thanks for the confirmation. I’ve flagged this for the team.


I have new finding.
The sonarcloud analysis only doesn’t work when it’s triggered by PR. When I run it on my branch it works normally.

1 Like

Hello @Piotr_Laczykowski ! :slightly_smiling_face:

I’ll take a look into your issue. I can see you’ve done some troubleshooting with Ann, still, I would like to try a couple more things.

I worked on another Community thread similar to yours. Could you please try my suggestion here: SonarCloud Pull Request Run not working - #19 by aura ?

In your case, the URL would be something like{AzureDevOpsOrg}/_apis/git/repositories/Spark_Ops/pullRequests/7619?api-version=6.0 (replacing the organization name with your own).

Could you please share your findings here following what’s mentioned in the other thread?

Yeah nothing helps. I can see that to solution for this case was creating a new project.

That was the other case but could you please send me the information about what are you getting with the curl command using the URL from your project and using the PAT?

Curl works but there is no info after that

Hello again @Piotr_Laczykowski

No info returned by the curl command is an indicator that there must be something wrong with the PAT being used. We had a similar thread about this (see this reply).

Based on that other thread, could you please confirm the following?

  • Try the other URLs suggested in the thread to test the PAT using curl
  • The user that is creating the PAT has access type Basic (see access levels here)
  • The PAT created and used in SonarCloud follows this documentation.
1 Like

I found another thing. I can’t find my project in sonarcloud at all

If you can’t find your projects in SonarCloud, this leads me to think the PAT you have configured in SonarCloud for the Azure DevOps connectivity is not valid.

Could you please go to SonarCloud and go to your Organization Administration section and then under Organization Settings go to Azure DevOps connectivity management to make sure the message under Personal Access Token indicates the token is valid?

If the token is invalid, you’ll see something like:

If this is the case, then please update the PAT with the new value you have from Azure DevOps and this will look now like:

Please find more information about the SonarCloud Azure DevOps documentation here.

I’ve just recreated manually projects and it works now

1 Like