Hi all,
Since last Friday (10th May 2024) my org has been experiencing an issue when searching for existing projects that have already been added.
We have 127 projects but when we try to filter that list down by searching for a a known project it returns an empty list. In the browser console this search activity returns a 400 response from
This is also affecting our pipeline runs via CICD. For example the below project exists, I canât search for it but I know it exists as when I try to add a new project I can see that it has already been added to my organisation.
##[error]ERROR: Error during SonarScanner execution
ERROR: Could not find a default branch for project with key âMyOrg.Examle.Projectâ. Make sure project exists.
ERROR:
ERROR: Error during SonarScanner execution
ERROR: Could not find a default branch for project with key âMyOrg.Examle.Projectâ. Make sure project exists.
ERROR:
Not really sure how I can move forward with this as we have had to disable sonarcloud in some CICD projects because of this issue. It doesnât appear to be end user related as I have been able to confirm this behavior with 2 other colleagues.
Is there an ongoing issue with sonarcloud backend API? As all things seem to be pointing to that 400 error we get when searching for a project. Yet there are no outages reported on the status page.
The organisation is on a paid plan and all projects are private. Could really do with some help to get this back working again.
I understand that you are getting a 400 error when trying to search a project (filter=query+%3D+âExample.Projectâ) that is under one of your organizations (organization=MyOrg) using the search_projects API.
Please note that the organization key must follow the following pattern (as described in the API and in the UI when creating an organization manually):
Organization key must start with a lowercase letter or number, followed by lowercase letters, numbers or hyphens, and must end with a letter or number. Maximum length: 255 characters.
That being said, I have been running some tests at my end, and I got the same response as you when trying to find the projects under my organization filtering by the organization name instead of using the key (or using the wrong key of my organization or using upper case for the organization key):
Thank you for the reply. The code snippets I added were examples as I didnât want to post sensitive data about my org.
My org key is lower case and has been working fine for the last two years. Only recently have we started to experience this issue which SonarCloud have acknowledged as an issue.
Could you make sure that your SONAR_TOKEN is configured correctly in your CICD? Its misconfiguration (e.g. if it isnât available in the context) may cause Could not find a default branch for project with key âMyOrg.Examle.Projectâ. Make sure project exists error on the scanner side.
This wouldnât explain the issue you see on the browser side, though.
Iâll contact you privately to get more information about your project, and we can then examine the logs.