Could not find the pullrequest with key '501'

INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]ERROR: Could not find the pullrequest with key '501'
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=Project-NAME&pullrequestKey=501 : {"errors":[{"msg":"Unable to find the pullrequest with key \u0027501\u0027"}]}
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
ERROR: Could not find the pullrequest with key '501'
ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=Project-Name&pullrequestKey=501 : {"errors":[{"msg":"Unable to find the pullrequest with key \u0027501\u0027"}]}
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
##[error]The process '/home/vsts/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.43.2/sonar-scanner/bin/sonar-scanner' failed with exit code 2

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Verified bounce is pointing to right organization, keys are active, even PAT is good, its happening on PRV, verified from sonarcloud its pointing to right project, The scan on PRs was working fine but its showing error from past Friday, i don’t see any details of PR on Sonarcloud and getting this error whenever we create a PR and merge to stage then the PRV triggers as per pipeline rules, PRV has sonarcloud scan which is failing with above error, but i don’t see anything about PR on sonarcloud only error on Azure pipeline, please suggest

Hi,

Welcome to the community!

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 (personal access token) you’ve configured SonarCloud with.

 
HTH,
Ann

PAT token was valid but still i created a new key and updated with full access and again to make sure its working by still not working, getting same error, i verified other tokens, bounce etc all looks good,
the issue appears when i do change and create a PR then as per policy pipeline will run the PRV which has sonar cloud scan, here its failing and giving error::
Please suggest:

  1. ##[error]ERROR: Error during SonarScanner execution

ERROR: Error during SonarScanner execution

##[error]ERROR: Could not find the pullrequest with key ‘560’

ERROR: Could not find the pullrequest with key ‘560’

##[error]ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=company_projectname&pullrequestKey=560 : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u0027560\u0027”}]}

ERROR:

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

ERROR: Caused by: Error 404 on https://sonarcloud.io/api/alm_integration/show_pullrequest?project=company_projectfilename&pullrequestKey=560 : {“errors”:[{“msg”:“Unable to find the pullrequest with key \u0027560\u0027”}]}

ERROR:

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

##[error]The process ‘/home/vsts/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.43.2/sonar-scanner/bin/sonar-scanner’ failed with exit code 2

Finishing: Run Code Analysis

Issue resolved, make sure owner has permissions along with PAT, thanks

1 Like

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