Error creating sonarcloud project

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
    Github
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
    Azure DevOps
  • Scanner command used when applicable (private details masked)
    N/A
  • Languages of the repository
    .NET
  • Only if the SonarCloud project is public, the URL
    N/A
    • And if you need help with pull request decoration, then the URL to the PR too
      N/A
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
    When trying to create a project via any means either manual, importing the repository or setting up a mono repo the following error occurs, this has been happening for over a week now.
{"errors":[{"msg":"An unexpected error occurred. Please try again later."}]}
  • Steps to reproduce
    Analyze new project, manual, import and monorepo - all fail
  • Potential workaround
    None
1 Like

Hi,

Welcome to the community!

Are you logged into GitHub and Azure DevOps when you’re getting this error?

Are you trying to import through the UI? I ask because you wouldn’t typically see this JSON error response.

Could you pick just one scenario & describe your steps in detail?

 
Ann

Hi Ann, thanks for getting back to me.

Definitely logged into both Github and Azure DevOps and yes this is using the UI, I picked the JSON error out of the browser network trace when trying to investigate the failure, but it’s not a very helpful error :smile:

So for one of the three methods I’ve tried I simply go to ‘Analyze new project’, my list of repositories loads fine, I select the one I’m trying to set up and click Set Up. This is what throws the above error.

This also happens if I select the Monorepo feature and strangely enough also for the Manual setup which has nothing to do with a specific repository.

Hi,

Could you provide your organization name, please?

 
Ann

Is there a private channel where I can share the specifics?

Hi @EwanN,

Apologies for the delay. Could you try again and tell me which API endpoint returns the {"errors":[{"msg":"An unexpected error occurred. Please try again later."}]} response?

Could you also let me know at what time you’ve performed the API request, so that I can easily find it in out logs.

Hi there,
POST https://sonarcloud.io/api/alm_integration/provision_projects
HTTP Code 400
{“errors”:[{“msg”:“Could not provision some of the projects (0/1)”}]}

Wed, 03 Aug 2022 08:42:15 GMT

1 Like

Hi @EwanN,

Thanks. The issue is that your new project matches two permission templates that are defined in your organization. A project should only match at most one permission template.

Can you have a look at the Project key pattern of your permission templates? You can find this under Organization > Administration > Permission templates

Of course the error message you got was not helpful at all, we’ll improve it on our side.

1 Like

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