Since last week every run of the sonarqube-scan-action GH action has failed with the following error:
Run SonarSource/sonarqube-scan-action@v6
with:
projectBaseDir: web-next
scannerVersion: 7.2.0.5079
scannerBinariesUrl: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli
env:
SONAR_TOKEN: ***
Installing Sonar Scanner CLI 7.2.0.5079 for linux-x64...
Downloading from: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-7.2.0.5079-linux-x64.zip
/usr/bin/unzip -o -q /home/runner/work/_temp/aee535f1-3a4e-4e3c-920f-7919649e337e
Sonar Scanner CLI cached to: /opt/hostedtoolcache/sonar-scanner-cli/7.2.0.5079/linux-x64
/opt/hostedtoolcache/sonar-scanner-cli/7.2.0.5079/linux-x64/bin/sonar-scanner -Dsonar.projectBaseDir=web-next
12:45:54.426 INFO Scanner configuration file: /opt/hostedtoolcache/sonar-scanner-cli/7.2.0.5079/linux-x64/conf/sonar-scanner.properties
12:45:54.430 INFO Project root configuration file: /home/runner/work/seedlegals/seedlegals/web-next/sonar-project.properties
12:45:54.449 INFO SonarScanner CLI 7.2.0.5079
12:45:54.451 INFO Linux 6.17.0-1008-azure amd64
12:45:55.399 INFO Communicating with SonarQube Cloud
12:45:55.400 INFO JRE provisioning: os[linux], arch[x86_64]
12:45:59.412 INFO Starting SonarScanner Engine...
12:45:59.414 INFO Java 21.0.9 Eclipse Adoptium (64-bit)
12:46:00.974 INFO Load global settings
12:46:02.008 INFO Load global settings (done) | time=1033ms
12:46:02.123 INFO Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
12:46:02.429 INFO Loading required plugins
12:46:02.429 INFO Load plugins index
12:46:02.615 INFO Load plugins index (done) | time=186ms
12:46:02.618 INFO Load/download plugins
12:46:03.687 INFO Load/download plugins (done) | time=1072ms
12:46:04.035 INFO Loaded core extensions: sca, architecture, a3s
12:46:04.359 INFO Process project properties
12:46:04.378 INFO Project key: seedlegals_seedlegals_fe
12:46:04.381 INFO Base dir: /home/runner/work/seedlegals/seedlegals/web-next
12:46:04.381 INFO Working dir: /home/runner/work/seedlegals/seedlegals/web-next/.scannerwork
12:46:04.395 INFO Found an active CI vendor: 'Github Actions'
12:46:04.403 INFO Load project branches
12:46:04.725 INFO Load project branches (done) | time=324ms
12:46:04.733 INFO Load project settings for component key: 'seedlegals_seedlegals_fe'
12:46:05.834 INFO Check ALM binding of project 'seedlegals_seedlegals_fe'
12:46:06.422 INFO Detected project binding: NONEXISTENT
12:46:06.424 INFO Check ALM binding of project 'seedlegals_seedlegals_fe' (done) | time=588ms
12:46:06.428 INFO Load project pull requests
12:46:06.827 INFO Load project pull requests (done) | time=398ms
12:46:06.835 INFO Load branch configuration
12:46:06.837 INFO Github event: pull_request
12:46:06.846 INFO Auto-configuring pull request 31706
12:46:06.930 ERROR Could not find a default branch for project with key 'seedlegals_seedlegals_fe'. Make sure project exists.
12:46:07.257 INFO EXECUTION FAILURE
12:46:07.258 INFO Total time: 12.835s
Error: Action failed: The process '/opt/hostedtoolcache/sonar-scanner-cli/7.2.0.5079/linux-x64/bin/sonar-scanner' failed with exit code 3
Having looked at this forum there are numerous threads with the same failure and exit code, all with different outcomes and seeming reasons, but no clear guidance.
Perhaps foolishly following the advice given here I changed our project’s GitHub repository binding to a different repo, only to find that I cannot change it back. This may be because we have two projects linked to the same repository, but that’s a guess.
Edit: Creating a new project on the same repo using the monorepo link allowed me to change the other one back to that repository again, but now the bindings page shows a “monorepo” tag. Weird. No change to the outcome of the scanner though.
Thanks.