SonarCloud, GitHub: "master" branch has not been analyzed yet and you have multiple branches already

Template for a good new topic, formatted with Markdown:

  • ALM used GitHub
  • CI system used Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository - TypeScript
  • Only if the SonarCloud project is public, the URL - PRIVATE
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)

Logging into our Sonarcloud, “Main Branch” page has the following:

"master" branch has not been analyzed yet and you have multiple branches already. It looks like it is not your Main Branch, check your configuration.

The “It looks like it is not your Main Branch” sticks out to me. We just migrated from BitBucket to GitHub so a ton of branches appeared almost simultaneously. Perhaps this is related?

Additionally, code coverage stats seem wrong. We’re using Jest. I’ve confirmed coverage looks right when I run it locally. Seems like a configuration issue but the docs are really light when it comes to the Sonarcloud CircleCI Orb.

  • Steps to reproduce

Run tests. Visit Sonarcloud.

  • Potential workaround

???

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Perhaps this is related: after merging a PR into master, the Sonar scanner fails:

INFO: ------------- Check Quality Gate status
INFO: Waiting for the analysis report to be processed (max 300s)
INFO: Time spent writing ucfgs 5975ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5:07.388s
INFO: Final Memory: 572M/1612M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
ERROR: CE Task finished abnormally with status: FAILED, you can check details here: https://sonarcloud.io/api/ce/task?id=REDACTED-REDACTED-REDACTED

When I visit the details link, I get a JSON string with {"errors":[{"msg":"Project doesn\u0027t exist"}]}. Perhaps I lack appropriate authorization to view that page, I am not an admin for the organization.