ERROR Could not find the pullrequest but the branch analysis working

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
    Azure DevOps

  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
    Azure DevOps

  • Scanner command used when applicable (private details masked)
    Azure DevOps task (SonarCloudAnalyze@3)

  • Languages of the repository
    Python, SQL

  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    PR analysis is failing with ##[error]10:55:39.183 ERROR Could not find the pullrequest with key '433'
    10:55:39.183 ERROR Could not find the pullrequest with key '433'
    10:55:39.511 INFO EXECUTION FAILURE
    10:55:39.512 INFO Total time: 13.843s

    ##[error][ERROR] SonarQube Cloud: Error while executing task Analyze: The process '/opt/hostedtoolcache/SonarScanner CLI/7.1.0/x64/sonar-scanner-7.1.0.4889/bin/sonar-scanner' failed with exit code 3
    ##[error]The process '/opt/hostedtoolcache/SonarScanner CLI/7.1.0/x64/sonar-scanner-7.1.0.4889/bin/sonar-scanner' failed with exit code 3

  • Steps to reproduce
    Just create PR and let the analysis run

  • Potential workaround
    No workaround right now, have to skip and run the branch analysis.

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

We are SonarCloud customer and we have sent email to Contact Sonarcontact@sonarsource.com and they asked to create ticket on this forum.

Hi,

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 SonarQube Cloud with.

 
HTH,
Ann

Thanks! I have updated the PAT but strange thing is branch analysis working. Yeah, you are right that its 403 because PR analysis require PR details but branch, hopefully don’t. Let’s see for the next PR analysis.

It start happen for me today.
I changed the PAT but it still doesn’t work.

Hi @chungvtran,

Which PAT did you update? It’s quite possible you have one configured at both the project and organization levels.

 
Ann

Thank @ganncamp
I forget to update the PAT at organization level.
It work now.

I have got same problem. PAT on organization level is valid with all premissions to DevOps.

Hi @michal-martyniak_hen,

Welcome to the community!

Please create a new thread with all your details.

 
Thx,
Ann