Hi everyone!
I’m trying to insert Sonarcloud in a CircleCI pipeline through its YML in our Github repository, the scan is correctly triggered but it is having trouble with the requests:
18:38:11.628 DEBUG: GET 404 https://sonarcloud.io/api/project_branches/list?project=[spoiler]PROJECTNAME[/spoiler] | time=272ms
18:38:11.628 DEBUG: Could not process project branches - continuing without it
18:38:11.628 INFO: Load project branches (done) | time=273ms
18:38:11.630 INFO: Check ALM binding of project PROJECTNAME
18:38:11.898 DEBUG: GET 401 https://sonarcloud.io/api/alm_integration/is_project_bound?project=[spoiler]PROJECTNAME[/spoiler] | time=267ms
18:38:11.898 WARN: Failed to check if project 'PROJECTNAME' is bound
18:38:11.898 INFO: Detected project binding: ERROR
18:38:11.898 INFO: Check ALM binding of project 'PROJECTNAME' (done) | time=268ms
18:38:11.900 INFO: Load project pull requests
18:38:12.173 DEBUG: GET 404 https://sonarcloud.io/api/project_pull_requests/list?project=PROJECTNAME | time=272ms
18:38:12.173 DEBUG: Could not process project pull requests - continuing without it
and at the end:
Caused by: Could not find a default branch to fall back on.
Apparently the scan is not correctly using the Sonar token that is defined in GitHub.
The project is correctly bound when I look at the platform. I’m in the same conditions as other repos that the scan works just fine. The only difference is that this repo works with Gradle, but I don’t believe that this would cause this type of issue.
I’ve check the solution to this similar issue here but it doesn’t work as well.
Does anyone have any ideas?