Unable to find the pullrequest with key `X`

hi, i hve an issues when running scanner for merge_requests, but its running well when scan master, development

the error log like this

Caused by: Error 404 on [MASKED]/api/alm_integration/show_pullrequest?project=xyz&pullrequestKey=1263 : {"errors":[{"msg":"Unable to find the pullrequest with key \u00271263\u0027"}]}

Hi,

Welcome to the community!

Does the PR number in the error message exist in GitLab?

 
Ann

yaps, the PR its already on Gitlab.

But, When i to go to sonarCcloud UI → Pull Request, its empty state like this

Hi,

Could you

  • double check the auth token and make sure it hasn’t expired
  • click on the GitLab icon in the UI and make sure that the PR exists in the repo you land in?

 
Ann

it’s not expired i think, cause its running well for master and development branch. just issues for merge request.

the PR is exist

any suggestion @ganncamp?

Hi,

Can you click on the GitLab icon in the UI and make sure that the PR exists in the repo you land in?

 
Ann

yap its exists in repo

Hi,

We’ve checked the logs, and SonarCloud is getting a 404 for the merge request URL.

Can you double check the project id in the URL is the same as the one that shows up in your GitLab repo in the top of the UI?

Note also that GitLab will return a 404 for a valid URL if the person/account making the request doesn’t have permissions to access it. So this could be a question of the access token you’ve configured for SonarCloud to use. Can you try accessing that URL using the same token you’ve configured for SonarCloud to use?

 
Ann