Error during SonarScanner execution (ERROR: Could not find the pullrequest with key xxxx)

Since Monday, June 12th, we have been experiencing issues with the analysis of SonarCloud for new pull requests. There are no issues on other branche like main. We have not made any changes to the code pipeline, but we have upgraded SonarCloud to version 1.40.0.
Is the problem we are encountering related to this incident

ERROR: Could not find the pullrequest with key ‘xxxx’
ERROR: Caused by: Error 404 on : {“errors”:[{“msg”:“Unable to find the pullrequest with key xxxx”}]}
ERROR: Error during SonarScanner execution

Hey there.

It looks like the token being used to make the connection between SonarCloud and Azure DevOps is (no longer) valid. Take a look at your project-level Administration > Pull Requests or organization-level Administration > Organization settings > Azure DevOps connectivity management and make sure a valid token is set.

I verified it and it’s a valid token


Sorry but it’s not only pull requests but also the main branch is impacted

Is the main branch impacted with the same error? It shouldn’t be trying to look up a pull request if it’s running on the main branch.

My bad we don’t have the problem on main, we just disable sonar on our pipelines that’s why I didn’t see any activities for main branch.
have other azuredevops customers reported the same problem?

Coming back to this point:

It looks like you’ve verified the SonarCloud token on the Azure DevOps side, but what about the Azure DevOps token on the SonarCloud side?

Hello after checking the token on sonarcloud side, the token was invalid. We regenerate one, and the problem is resolved

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.