Receiving 404 error on sonarcloud/scan step during Pull Request using circleci and github

  • ALM: GitHub
  • CI system: Circle CI
  • Languages of the repository: Typescript
  • Error observed:
    INFO: Load project branches
    INFO: Load project branches (done) | time=242ms
    INFO: Check ALM binding of project 'shore-gmbh_appointment-v2-app'
    INFO: Detected project binding: BOUND
    INFO: Check ALM binding of project 'shore-gmbh_appointment-v2-app' (done) | time=223ms
    INFO: Load project pull requests
    INFO: Load project pull requests (done) | time=233ms
    INFO: Load branch configuration
    INFO: Auto-configuring pull request 37
    INFO: ------------------------------------------------------------------------
    INFO: ------------------------------------------------------------------------
    INFO: Total time: 5.388s
    INFO: Final Memory: 10M/47M
    INFO: ------------------------------------------------------------------------
    ERROR: Error during SonarScanner execution
    ERROR: Could not find the pullrequest with key '37'
    ERROR: Caused by: Error 404 on : {"errors":[{"msg":"The pullrequest could not be found"}]}
    ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
    Exited with code exit status 2  
  • Steps to reproduce:
    • Pull request and trigger pipeline to run sonarcloud analyze.
  • Notes
    • It occurred for the first time 26 days ago (Wednesday, October 4th, 2023 at 12:23:17 PM GMT-03:00), but it was intermittent. Now it’s happening for all PR open on this project. It works perfectly on the main branch.
    • We have other projects on behalf of the organization that are working normally.
    • Similar issue on this forum
    • Using sonarcloud orb from circleci (version sonarsource/sonarcloud@2.0.0)
    # File config.yml
    version: 2.1
      sonarcloud: sonarsource/sonarcloud@2.0.0
    # More code here
    # ...
      - sonarcloud/scan

Hi! I’m using sonarcloud orb for cicleci and since October 4th, 2023 I’ve experienced the issue above. It was intermittent initially, but now it’s happening for all PRs open on this project. It works perfectly on the main branch and other organization projects. Can you help me? Thanks!

Hi @Ricardo_Cavalcanti,

Welcome to the community. I tried to dig into the logs and couldn’t find anything useful. Can you share the detailed debug logs privately?

There was also a similar thread I found which might be helpful.