Bitbucket cloud error: Could not find a default branch to fall back on

  • ALM used Bitbucket
  • CI system used Bitbucket Cloud
  • Scanner command used when applicable
    mvn -B -s ./ci-config/maven-settings.xml org.jacoco:jacoco-maven-plugin:prepare-agent verify -Dproject.path=$BITBUCKET_CLONE_DIR org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed : Could not find a default branch to fall back on.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (default-cli) on project nnsites: Could not find a default branch to fall back on.

  • Steps to reproduce : run pipeline and send report to sonarcloud
  • Potential workaround : none.

Dear support,
We are experiencing issues with sending reports to sonarcloud from bitbucket cloud.
We have verified the proper project key and that it existis properly on sonarcloud.

While adding debug to maven command we see following errors, please advise what should be done next :

[INFO] 16:22:38.839 Load project branches
[DEBUG] 16:22:39.360 GET 404 https://sonarcloud.io/api/project_branches/list?project=novonordiskextweb_trueblue-sites | time=520ms
[DEBUG] 16:22:39.360 Could not process project branches - continuing without it
[INFO] 16:22:39.361 Load project branches (done) | time=522ms
[INFO] 16:22:39.364 Check ALM binding of project 'novonordiskextweb_trueblue-sites'
[DEBUG] 16:22:39.883 GET 404 https://sonarcloud.io/api/alm_integration/is_project_bound?project=novonordiskextweb_trueblue-sites | time=518ms
[INFO] 16:22:39.884 Detected project binding: NONEXISTENT
[INFO] 16:22:39.884 Check ALM binding of project 'novonordiskextweb_trueblue-sites' (done) | time=520ms
[INFO] 16:22:39.888 Load project pull requests
[DEBUG] 16:22:40.414 GET 404 https://sonarcloud.io/api/project_pull_requests/list?project=novonordiskextweb_trueblue-sites | time=525ms
[DEBUG] 16:22:40.415 Could not process project pull requests - continuing without it
[INFO] 16:22:40.416 Load project pull requests (done) | time=528ms

The solution was to remove the project and add it again.

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