ERROR Could not find a default branch for project with key. Make sure project exists

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps) - Github
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI - Github Actions
  • Scanner command used when applicable (private details masked) - GitHub - SonarSource/sonarqube-scan-action (sonarsource/sonarqube-scan-action@v6.0.0)
  • Languages of the repository - Python
  • 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 (wrap logs/code around with triple quotes ``` for proper formatting)
02:16:44.107 ERROR Could not find a default branch for project with key '<PROJECT_KEY>'. Make sure project exists.
  • Steps to reproduce

Run Github Actions workflow with sonarsource/sonarqube-scan-action@v6.0.0.

The most recent workflow run was October 13, 2025 2:17 AM UTC

I’m aware that there was an incident related to this issue but was informed it has been resolved. But the issue persists for some of the projects in our organization.

Note that the scan used to work prior to the incident.

  • Potential workaround

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

Hi,

Could we have the full analysis log?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.

 
Thx,
Ann

Here’s the log of the github workflow with verbose flag on.

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/2444fb4d-6f8a-4522-954d-312a6f570d54
Sonar Scanner CLI cached to: /home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64
/home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/bin/sonar-scanner -Dsonar.projectBaseDir=. -Dsonar.organization=ORG -Dsonar.projectKey=ORG_PROJECT -Dsonar.python.coverage.reportPaths=coverage.xml -Dproject.settings=./sonar-project.properties -Dsonar.scm.provider=git -Dsonar.verbose=true
03:04:45.479 INFO  Scanner configuration file: /home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/conf/sonar-scanner.properties
03:04:45.484 INFO  Project root configuration file: /home/runner/_work/PROJECT/PROJECT/./sonar-project.properties
03:04:45.505 INFO  SonarScanner CLI 7.2.0.5079
03:04:45.508 DEBUG Java 17.0.15 Eclipse Adoptium (64-bit)
03:04:45.509 INFO  Linux 6.6.93+ amd64
03:04:45.516 DEBUG Scanner max available memory: 2 GB
03:04:45.548 DEBUG uname -m returned 'x86_64'
03:04:45.550 DEBUG Using JVM default truststore: /home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/jre/lib/security/cacerts
03:04:45.551 DEBUG Download cache base directory: /home/runner/.sonar/cache
03:04:45.551 DEBUG Create: /home/runner/.sonar/cache
03:04:45.552 DEBUG Create: /home/runner/.sonar/cache/_tmp
03:04:45.659 DEBUG Loading OS trusted SSL certificates...
03:04:45.659 DEBUG This operation might be slow or even get stuck. You can skip it by passing the scanner property 'sonar.scanner.skipSystemTruststore=true'
03:04:46.015 DEBUG Loaded [443] system trusted certificates
03:04:46.353 DEBUG Loaded truststore from '/home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/jre/lib/security/cacerts' containing 150 certificates
03:04:46.528 INFO  Communicating with SonarQube Cloud
03:04:46.529 INFO  JRE provisioning: os[linux], arch[x86_64]
03:04:46.570 DEBUG --> GET https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64
03:04:47.193 DEBUG <-- 200 https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64 (621ms, 471-byte body)
03:04:47.235 DEBUG Download https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz to /home/runner/.sonar/cache/_tmp/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar10103581593871341153gz
03:04:47.237 DEBUG --> GET https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz
03:04:48.048 DEBUG <-- 200 https://scanner.sonarcloud.io/jres/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz (810ms, 46382823-byte body)
03:04:51.644 DEBUG Create: /home/runner/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707
03:04:52.546 DEBUG Executing: /home/runner/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz_extracted/jdk-17.0.11+9-jre/bin/java --version
03:04:52.586 DEBUG openjdk 17.0.11 2024-04-16
03:04:52.586 DEBUG OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9)
03:04:52.586 DEBUG OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode, sharing)
03:04:52.592 DEBUG --> GET https://api.sonarcloud.io/analysis/engine
03:04:52.810 DEBUG <-- 200 https://api.sonarcloud.io/analysis/engine (217ms, 294-byte body)
03:04:52.812 DEBUG Download https://scanner.sonarcloud.io/engines/sonarcloud-scanner-engine-11.26.0.1060.jar to /home/runner/.sonar/cache/_tmp/sonarcloud-scanner-engine-11.26.0.10609963976257033800373jar
03:04:52.812 DEBUG --> GET https://scanner.sonarcloud.io/engines/sonarcloud-scanner-engine-11.26.0.1060.jar
03:04:53.004 DEBUG <-- 200 https://scanner.sonarcloud.io/engines/sonarcloud-scanner-engine-11.26.0.1060.jar (191ms, 33408691-byte body)
03:04:54.698 DEBUG Create: /home/runner/.sonar/cache/d1325aba22edbf70e87c3aa82fd41ab4047b0f950f2a079f3f6378bdaeabfaaa
03:04:54.702 DEBUG Work directory: /home/runner/_work/PROJECT/PROJECT/.scannerwork
03:04:54.711 DEBUG Executing: /home/runner/.sonar/cache/bcb1b7b8ad68c93093f09b591b7cb17161d39891f7d29d33a586f5a328603707/OpenJDK17U-jre_x64_linux_hotspot_17.0.11_9.tar.gz_extracted/jdk-17.0.11+9-jre/bin/java -Dorg.bouncycastle.pkcs12.ignore_useless_passwd=true -jar /home/runner/.sonar/cache/d1325aba22edbf70e87c3aa82fd41ab4047b0f950f2a079f3f6378bdaeabfaaa/sonarcloud-scanner-engine-11.26.0.1060.jar
03:04:55.016 INFO  Starting SonarScanner Engine...
03:04:55.017 INFO  Java 17.0.11 Eclipse Adoptium (64-bit)
03:04:55.070 DEBUG JVM max available memory: 2 GB
03:04:55.315 DEBUG Sonar User Home: /home/runner/.sonar
03:04:55.316 DEBUG Initialize DefaultScannerWsClient
03:04:55.406 DEBUG Loading OS trusted SSL certificates...
03:04:55.407 DEBUG This operation might be slow or even get stuck. You can skip it by passing the scanner property 'sonar.scanner.skipSystemTruststore=true'
03:04:55.756 DEBUG Loaded [443] system trusted certificates
03:04:55.992 DEBUG Loaded truststore from '/home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/jre/lib/security/cacerts' containing 150 certificates
03:04:56.265 INFO  Load global settings
03:04:56.280 DEBUG --> GET https://sonarcloud.io/api/settings/values.protobuf
03:04:56.753 DEBUG <-- 200 https://sonarcloud.io/api/settings/values.protobuf (472ms, unknown-length body)
03:04:56.766 INFO  Load global settings (done) | time=501ms
03:04:56.773 INFO  Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
03:04:56.775 DEBUG Initialize DownloadPluginsScannerWsClient
03:04:56.779 DEBUG Loading OS trusted SSL certificates...
03:04:56.779 DEBUG This operation might be slow or even get stuck. You can skip it by passing the scanner property 'sonar.scanner.skipSystemTruststore=true'
03:04:56.969 DEBUG Loaded [443] system trusted certificates
03:04:57.005 DEBUG Loaded truststore from '/home/runner/_work/_tool/sonar-scanner-cli/7.2.0.5079/linux-x64/jre/lib/security/cacerts' containing 150 certificates
03:04:57.054 DEBUG Create : /home/runner/.sonar/_tmp
03:04:57.055 DEBUG User cache: /home/runner/.sonar/cache
03:04:57.061 INFO  Loading required plugins
03:04:57.061 INFO  Load plugins index
03:04:57.061 DEBUG --> GET https://sonarcloud.io/api/plugins/installed
03:04:57.241 DEBUG <-- 200 https://sonarcloud.io/api/plugins/installed (179ms, unknown-length body)
03:04:57.255 INFO  Load plugins index (done) | time=194ms
03:04:57.255 INFO  Load/download plugins
03:04:57.256 DEBUG Download plugin 'iac' to '/home/runner/.sonar/_tmp/fileCache8890316202434757909.tmp'
03:04:57.256 DEBUG --> GET https://scanner.sonarcloud.io/plugins/iac/versions/1e89263383fb26600819c8f53471c475.jar
03:04:58.065 DEBUG <-- 200 https://scanner.sonarcloud.io/plugins/iac/versions/1e89263383fb26600819c8f53471c475.jar (808ms, 22471822-byte body)
03:05:00.440 DEBUG Download plugin 'iacenterprise' to '/home/runner/.sonar/_tmp/fileCache3707596233931672085.tmp'
03:05:00.440 DEBUG --> GET https://scanner.sonarcloud.io/plugins/iacenterprise/versions/ded50f6f15ced2f757e93143b5387bb8.jar
03:05:00.636 DEBUG <-- 200 https://scanner.sonarcloud.io/plugins/iacenterprise/versions/ded50f6f15ced2f757e93143b5387bb8.jar (195ms, 1657089-byte body)
03:05:00.739 DEBUG Download plugin 'jacoco' to '/home/runner/.sonar/_tmp/fileCache11243582365285371800.tmp'
03:05:00.739 DEBUG --> GET https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar
03:05:00.932 DEBUG <-- 200 https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar (193ms, 23258-byte body)
03:05:00.936 DEBUG Download plugin 'textenterprise' to '/home/runner/.sonar/_tmp/fileCache16998296589669855383.tmp'
03:05:00.937 DEBUG --> GET https://scanner.sonarcloud.io/plugins/textenterprise/versions/e5b8ceae1e3ed7d38073d09b5bfd6030.jar
03:05:01.131 DEBUG <-- 200 https://scanner.sonarcloud.io/plugins/textenterprise/versions/e5b8ceae1e3ed7d38073d09b5bfd6030.jar (193ms, 8034179-byte body)
03:05:01.585 INFO  Load/download plugins (done) | time=4329ms
03:05:01.586 DEBUG Plugins not loaded because they are optional: [abap, sonarapex, architecture, architecturejavascriptfrontend, architecturepythonfrontend, architecturecsharpfrontend, architecturejavafrontend, csharpenterprise, cpp, cobol, dart, dbd, dbdjavafrontendrewrite, dbdpythonfrontend, dre, flex, go, web, jcl, javasymbolicexecution, java, javascript, kotlin, php, pli, plsql, python, rpg, ruby, rust, sonarscala, jasmin, swift, tsql, vbnetenterprise, vb, security, securitycsharpfrontend, securitygofrontend, securityjsfrontend, securityjavafrontend, securitykotlinfrontend, securityphpfrontend, securitypythonfrontend, securityvbnetfrontend, xml]
03:05:01.662 DEBUG Plugins loaded:
03:05:01.663 DEBUG   * Text Code Quality and Security 2.30.0.8328 (textenterprise)
03:05:01.663 DEBUG   * JaCoCo 1.3.0.1538 (jacoco)
03:05:01.663 DEBUG   * IaC Code Quality and Security 1.51.0.16714 (iacenterprise)
03:05:01.664 DEBUG   * IaC Code Quality and Security 1.51.0.16714 (iac)
03:05:01.664 DEBUG --> GET https://sonarcloud.io/api/server/version
03:05:01.919 DEBUG <-- 200 https://sonarcloud.io/api/server/version (255ms, 11-byte body)
03:05:01.921 DEBUG Updated analysis started with a difference of -86 milliseconds
03:05:01.933 DEBUG Started at Wed Oct 15 03:04:56 GMT 2025
03:05:02.191 DEBUG register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$274/0x00007fdde42f30b8@2a32fb6 with shutdown hook
03:05:02.224 INFO  Found an active CI vendor: 'Github Actions'
03:05:02.245 INFO  Load project settings for component key: 'ORG_PROJECT'
03:05:02.246 DEBUG --> GET https://sonarcloud.io/api/settings/values.protobuf?component=ORG_PROJECT
03:05:02.720 DEBUG <-- 404 https://sonarcloud.io/api/settings/values.protobuf?component=ORG_PROJECT (474ms, unknown-length body)
03:05:02.729 INFO  Process project properties
03:05:02.740 DEBUG Process project properties (done) | time=12ms
03:05:02.741 INFO  Execute project builders
03:05:02.742 DEBUG Execute project builder: org.sonar.scanner.architecture.ArchitectureProjectBuilder
03:05:02.742 DEBUG Setting sonar.architecture.preview.available to false
03:05:02.743 INFO  Execute project builders (done) | time=0ms
03:05:02.747 INFO  Project key: ORG_PROJECT
03:05:02.748 INFO  Base dir: /home/runner/_work/PROJECT/PROJECT
03:05:02.748 INFO  Working dir: /home/runner/_work/PROJECT/PROJECT/.scannerwork
03:05:02.748 DEBUG Project global encoding: UTF-8, default locale: en_US
03:05:02.749 DEBUG Creating module hierarchy
03:05:02.750 DEBUG   Init module '[OM] New Blink Lookup Docs Service'
03:05:02.750 DEBUG     Base dir: /home/runner/_work/PROJECT/PROJECT
03:05:02.750 DEBUG     Working dir: /home/runner/_work/PROJECT/PROJECT/.scannerwork
03:05:02.751 DEBUG     Module global encoding: UTF-8, default locale: en_US
03:05:02.757 INFO  Load project branches
03:05:02.758 DEBUG --> GET https://sonarcloud.io/api/project_branches/list?project=ORG_PROJECT
03:05:03.218 DEBUG <-- 404 https://sonarcloud.io/api/project_branches/list?project=ORG_PROJECT (460ms, unknown-length body)
03:05:03.219 DEBUG Could not process project branches - continuing without it
03:05:03.219 INFO  Load project branches (done) | time=463ms
03:05:03.223 INFO  Check ALM binding of project 'ORG_PROJECT'
03:05:03.224 DEBUG --> GET https://sonarcloud.io/api/alm_integration/is_project_bound?project=ORG_PROJECT
03:05:03.942 DEBUG <-- 404 https://sonarcloud.io/api/alm_integration/is_project_bound?project=ORG_PROJECT (717ms, unknown-length body)
03:05:03.942 INFO  Detected project binding: NONEXISTENT
03:05:03.943 INFO  Check ALM binding of project 'ORG_PROJECT' (done) | time=720ms
03:05:03.945 INFO  Load project pull requests
03:05:03.947 DEBUG --> GET https://sonarcloud.io/api/project_pull_requests/list?project=ORG_PROJECT
03:05:05.042 DEBUG <-- 404 https://sonarcloud.io/api/project_pull_requests/list?project=ORG_PROJECT (1094ms, unknown-length body)
03:05:05.042 DEBUG Could not process project pull requests - continuing without it
03:05:05.046 INFO  Load project pull requests (done) | time=1100ms
03:05:05.049 INFO  Load branch configuration
03:05:05.050 INFO  Github event: pull_request
03:05:05.060 INFO  Auto-configuring pull request 244
03:05:05.088 DEBUG Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$274/0x00007fdde42f30b8@2a32fb6 during JVM shutdown
03:05:05.091 ERROR Could not find a default branch for project with key 'ORG_PROJECT'. Make sure project exists.
java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.InputComponentStore
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1034)
	at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1026)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1003)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:122)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:143)
	at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:58)
	at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:42)
Caused by: java.lang.IllegalStateException: Unable to load component interface org.sonar.scanner.scan.branch.BranchConfiguration
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
	at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
	at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
	at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
	at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
	at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
	at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
	at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
	at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
	at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
	at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
	at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
	at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
	... 23 common frames omitted
Caused by: org.sonar.api.utils.MessageException: Could not find a default branch for project with key 'ORG_PROJECT'. Make sure project exists.

Hi,

Thanks for the log.

How are you passing your authentication token in to analysis?

Also, you shouldn’t need to do any of these things:

These are the defaults.

This is read automatically from the environment. If it’s not, passing it manually won’t work.

 
Ann