Unexpected Error When Importing GitLab Projects to SonarCloud

Hello,

I recently purchased a Team license for SonarCloud and am trying to import my GitLab projects into my organization. I’m having a problem importing the projects with GitLab, hope you can help. This are the details.

ALM used: GitLab
CI system used: Not applicable (issue occurs when importing projects)
Scanner command used: Not applicable (issue occurs before scanning)
Languages of the repository: Not applicable (please specify if relevant)
Only if the SonarCloud project is public, the URL: Not applicable
Error observed:


No additional logs or debugging information are available.

Steps to reproduce:

  1. Log in to SonarCloud with a Team license.
  2. Navigate to my organization, binded with GitLab.
  3. Attempt to import a project from GitLab. Select one from the list of available projects and click on SetUp
  4. Select any option in the clean as you code setup screen and click on create.
  5. An “Unexpected Error” message appears without further details. On the console there is a 500 response code for this url https://sonarcloud.io/api/alm_integration/provision_projects

Potential workaround:
None found so far. Looking for guidance on how to debug this issue or obtain more detailed logs.

Additional information:
The organization was created using the GitLab/Sonarqube integration using an personal access token with api permissions on GitLab. The same personal access token is being used for the creation of the projects

Would appreciate any help in resolving this issue.

Thanks!

I think I know what is going on, or at least it is a possibility.

Our GitLab cloud instance has blocked IP access to the projects, so I believe that is the reason behind the problem.

If I want to allow Sonar to retrieve the projects for PR decorations and project creation, how can I do it without removing the IP block?

Edit: Found the list of public IPs for sonar here Organizations advanced administration | SonarQube Cloud Documentation

That solved the problem. Hope this helps

1 Like

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