Sonarcloud branch not computing issue

i am facing a sonarcloud quality gate not computing issue
i have renamed long-lived branch master to our branch name but it’s showsquality gate not computed, when running the bitbucket pipeline it shows an error like this

"ERROR: Error during SonarScanner execution
ERROR: Could not find a default branch to fall back on.
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
:heavy_multiplication_x: SonarCloud analysis failed. (exit code = 2)

sonar cloud suggested for setting a new code definition, i have changed the new code definition, but it won’t work,
Is there any way to solve this issue

Thanks for your help


Welcome to the community!

Please provide the full analysis log.


Hi, G Ann Campbell
Thank you for your response, i am sharing the complete bitbucket pipeline logs here as an attachment for your reference.

Thank you
saheed c p
pipelineLog-{3145c6f5-1535-417b-8cf6-cac2735b1af3}.txt (9.7 KB)

Hi Saheed,

Thanks for the log. I see this in it:

INFO: Detected project binding: NONEXISTENT

Does this project already exist on SonarCloud, or are you trying to create it via first analysis?

Also, I see that you’re checking out the development branch. Is that your main branch?


Hi Ann
This project is already in the sonar cloud and development is my main branch

saheed c p

1 Like


Thanks for the detail. I’ve flagged this for more expert eyes.


Hi Saheed,

Can I check exactly how you renamed the branch in bitbucket? I would like to recreate the issue locally. I know that there can be issues with this renaming of branches but I would like to see the issue to see if there is something we can do to help here.

From my side I have just tried to create a main branch in bitbucket, run the sonarcloud analysis and then change the branch name on bitbucket and redo the analysis against a pr merging into the new development branch. I have not experienced the error which you have shared. Maybe if you can share the mentioned information about how you did this branch name change and also how you updated it on sonarcloud it might help me to isolate the issue for you.