Could not find the pullrequest with key 'XXXX' error in Azure devops pipeline

Hi,

Our SonarCloud integration from our Azure Devops pipeline has worked fine up until Friday, but today we suddenly always get build errors like the one below. We get the error both when running a build for a PR that worked on Friday, and also when running a build for a new PR created today

I’ve tested the SonarCloud service connection in Azure Devops, and the Verify-button gives “Verification Succeeded”

Does anyone has any idea what has changed during this weekend that could cause this to happen?

Kindly regards
Eirik


##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]ERROR: Could not find the pullrequest with key ‘XXXX’
ERROR: Could not find the pullrequest with key ‘XXXX’
##[error]ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=&pullrequestKey=XXXX : {“errors”:[{“msg”:“Unable to find the pullrequest with key \uXXXX\XXXX”}]}
ERROR:
##[error]The SonarScanner did not complete successfully

1 Like

Same issue here. Looks like something is broken on Sonar’s side.

We have resolved our issue - it was an expired PAT in Azure DevOps.

It was an expired Azure Devops PAT in our case as well. The SonarCloud organization administration page for the Azure Devops connection stated “invalid access token” How nice it would have been if the build error said so as well. Would have saved us some time…

1 Like

Thanks for the comment about your fix “Kelvhandley”, it helped a lot!

2 Likes