Project not found on existing projects

Suddenly our CI/CD fails with the message project not found:

Caused by: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator to check the permissions of the user the token belongs to

We run our ci/cd in gitlab using docker image:
sonarsource/sonar-scanner-cli:latest

It is not just 1 project but several.

What I have done:

  • Checked permissions of the project => Everyone is allowed to execute analysis
  • Updated the token. SONAR_TOKEN and SONAR_HOST_URL are filled
  • checked sonar-project.properties for project key and organization. Nothing changed and are inline with the project in sonar cloud. And I still see the projects.

Not sure what to do next. Has anyone else faced this problem?

Hey there.

Can you provide the logs of the analysis (preferably at DEBUG level, setting the sonar.verbose=true analysis parameter or running sonar-scanner -X)?

08:49:43.925 ERROR: Error during SonarScanner execution
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:131)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:60)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:54)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
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)
	... 34 more
Caused by: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to
08:49:43.935 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00007efd4b2f7270@67440de6 during JVM shutdown

I still don’t know at which point of the analysis it’s failing. Complete logs would be appreciated. :slight_smile:

$ sonar-scanner -X
08:49:38.741 INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
08:49:38.754 INFO: Project root configuration file: /builds/<project_path>/sonar-project.properties
08:49:38.783 INFO: SonarScanner 5.0.1.3006
08:49:38.783 INFO: Java 17.0.10 Alpine (64-bit)
08:49:38.783 INFO: Linux 5.15.0-1045-azure amd64
08:49:38.934 DEBUG: keyStore is : 
08:49:38.934 DEBUG: keyStore type is : pkcs12
08:49:38.934 DEBUG: keyStore provider is : 
08:49:38.934 DEBUG: init keystore
08:49:38.934 DEBUG: init keymanager of type SunX509
08:49:39.045 DEBUG: Create: /builds/<project>/.sonar/cache
08:49:39.048 INFO: User cache: /builds/<project>/.sonar/cache
08:49:39.048 DEBUG: Create: /builds/<project>/.sonar/cache/_tmp
08:49:39.050 DEBUG: Extract sonar-scanner-api-batch in temp...
08:49:39.053 DEBUG: Get bootstrap index...
08:49:39.053 DEBUG: Download: https://sonarcloud.io/batch/index
08:49:39.322 DEBUG: Get bootstrap completed
08:49:39.325 DEBUG: Download https://sonarcloud.io/batch/file?name=scanner-sonarcloud-8.0.0.54533-all.jar to /builds/<project>/.sonar/cache/_tmp/fileCache4520903158730375310.tmp
08:49:40.783 DEBUG: Create isolated classloader...
08:49:40.793 DEBUG: Start temp cleaning...
08:49:40.795 DEBUG: Temp cleaning done
08:49:40.795 DEBUG: Execution getVersion
08:49:40.812 INFO: Analyzing on SonarQube server 8.0.0.54533
08:49:40.812 INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
08:49:40.813 DEBUG: Work directory: /builds/<project>/.scannerwork
08:49:40.814 DEBUG: Execution execute
08:49:41.020 DEBUG: JVM max available memory: 980 MB
08:49:41.054 DEBUG: SonarCloud 10.6.0.2114
08:49:41.204 DEBUG: Sonar User Home: /builds/<project>/.sonar
08:49:41.205 DEBUG: Initialize DefaultScannerWsClient
08:49:41.485 DEBUG: Loaded [441] system trusted certificates
08:49:41.583 INFO: Load global settings
08:49:41.596 DEBUG: --> GET https://sonarcloud.io/api/settings/values.protobuf
08:49:41.766 DEBUG: <-- 200 https://sonarcloud.io/api/settings/values.protobuf (169ms, unknown-length body)
08:49:41.778 INFO: Load global settings (done) | time=195ms
08:49:41.782 INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
08:49:41.784 DEBUG: Initialize DownloadPluginsScannerWsClient
08:49:41.986 DEBUG: Loaded [441] system trusted certificates
08:49:41.992 DEBUG: Create : /builds/<project>/.sonar/_tmp
08:49:41.993 DEBUG: User cache: /builds/<project>/.sonar/cache
08:49:42.001 INFO: Loading required plugins
08:49:42.002 INFO: Load plugins index
08:49:42.003 DEBUG: --> GET https://sonarcloud.io/api/plugins/installed
08:49:42.052 DEBUG: <-- 200 https://sonarcloud.io/api/plugins/installed (48ms, unknown-length body)
08:49:42.092 INFO: Load plugins index (done) | time=90ms
08:49:42.093 INFO: Load/download plugins
08:49:42.094 DEBUG: Download plugin 'iac' to '/builds/<project>/.sonar/_tmp/fileCache16482595341123827775.tmp'
08:49:42.095 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/iac/versions/0b477b8b47bf5a951d87a9826d601019.jar
08:49:42.155 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/iac/versions/0b477b8b47bf5a951d87a9826d601019.jar (60ms, 17304090-byte body)
08:49:42.393 DEBUG: Download plugin 'jacoco' to '/builds/<project>/.sonar/_tmp/fileCache12384205803179895334.tmp'
08:49:42.393 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar
08:49:42.406 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/jacoco/versions/04bba36a445c3713a632aa358be2f99c.jar (12ms, 23258-byte body)
08:49:42.410 DEBUG: Download plugin 'license' to '/builds/<project>/.sonar/_tmp/fileCache17176164063826906707.tmp'
08:49:42.411 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/license/versions/437917d840c5b548f517cfd901d9243b.jar
08:49:42.425 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/license/versions/437917d840c5b548f517cfd901d9243b.jar (13ms, 15022-byte body)
08:49:42.430 DEBUG: Download plugin 'python' to '/builds/<project>/.sonar/_tmp/fileCache13000436465178445153.tmp'
08:49:42.431 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/python/versions/8ed77d553d52e3c4a37d9122887e419f.jar
08:49:42.444 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/python/versions/8ed77d553d52e3c4a37d9122887e419f.jar (13ms, 14274281-byte body)
08:49:42.562 DEBUG: Download plugin 'text' to '/builds/<project>/.sonar/_tmp/fileCache7838850116759990637.tmp'
08:49:42.563 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/text/versions/7c2ce90b3065bfaf5d55dd3ea4deca5e.jar
08:49:42.578 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/text/versions/7c2ce90b3065bfaf5d55dd3ea4deca5e.jar (14ms, 6666691-byte body)
08:49:42.635 DEBUG: Download plugin 'xml' to '/builds/<project>/.sonar/_tmp/fileCache239851441103783554.tmp'
08:49:42.635 DEBUG: --> GET https://scanner.sonarcloud.io/plugins/xml/versions/dc7530956473c81946456a4a3587ff22.jar
08:49:42.651 DEBUG: <-- 200 https://scanner.sonarcloud.io/plugins/xml/versions/dc7530956473c81946456a4a3587ff22.jar (15ms, 2507592-byte body)
08:49:42.675 INFO: Load/download plugins (done) | time=582ms
08:49:42.676 DEBUG: Plugins not loaded because they are optional: [abap, sonarapex, csharp, cpp, cobol, dbd, dbdjavafrontend, dbdpythonfrontend, flex, go, web, java, javascript, kotlin, php, pli, plsql, rpg, ruby, sonarscala, swift, tsql, vbnet, vb, security, securitycsharpfrontend, securityjsfrontend, securityjavafrontend, securityphpfrontend, securitypythonfrontend]
08:49:42.715 DEBUG: Plugins loaded:
08:49:42.715 DEBUG:   * License for SonarLint 8.0.0.54533 (license)
08:49:42.715 DEBUG:   * Python Code Quality and Security 4.18.0.15334 (python)
08:49:42.715 DEBUG:   * XML Code Quality and Security 2.10.0.4108 (xml)
08:49:42.715 DEBUG:   * JaCoCo 1.3.0.1538 (jacoco)
08:49:42.715 DEBUG:   * IaC Code Quality and Security 1.30.0.10357 (iac)
08:49:42.715 DEBUG:   * Text Code Quality and Security 2.10.0.2188 (text)
08:49:42.716 DEBUG: --> GET https://sonarcloud.io/api/server/version
08:49:42.762 DEBUG: <-- 200 https://sonarcloud.io/api/server/version (45ms, 11-byte body)
08:49:42.765 DEBUG: Updated analysis started with a difference of -21 milliseconds
08:49:42.774 DEBUG: Started at Wed May 22 08:49:41 GMT 2024
08:49:42.986 DEBUG: register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00007efd4b2f7270@67440de6 with shutdown hook
08:49:43.012 INFO: Found an active CI vendor: 'Gitlab CI'
08:49:43.020 INFO: Load project settings for component key: '<project_key>'
08:49:43.021 DEBUG: --> GET https://sonarcloud.io/api/settings/values.protobuf?component=<project_key>
08:49:43.080 DEBUG: <-- 200 https://sonarcloud.io/api/settings/values.protobuf?component=<project_key> (59ms, unknown-length body)
08:49:43.083 INFO: Load project settings for component key: '<project_key>' (done) | time=63ms
08:49:43.095 INFO: Process project properties
08:49:43.103 DEBUG: Process project properties (done) | time=8ms
08:49:43.106 INFO: Project key: <project_key>
08:49:43.106 INFO: Base dir: /builds/<project_path>
08:49:43.106 INFO: Working dir: /builds/<project>/.scannerwork
08:49:43.107 DEBUG: Project global encoding: UTF-8, default locale: en_US
08:49:43.108 DEBUG: Creating module hierarchy
08:49:43.108 DEBUG:   Init module 'Website'
08:49:43.113 DEBUG:     Base dir: /builds/<project_path>
08:49:43.113 DEBUG:     Working dir: /builds/<project>/.scannerwork
08:49:43.113 DEBUG:     Module global encoding: UTF-8, default locale: en_US
08:49:43.121 INFO: Load project branches
08:49:43.122 DEBUG: --> GET https://sonarcloud.io/api/project_branches/list?project=<project_key>
08:49:43.433 DEBUG: <-- 200 https://sonarcloud.io/api/project_branches/list?project=<project_key> (310ms, unknown-length body)
08:49:43.438 INFO: Load project branches (done) | time=316ms
08:49:43.440 INFO: Check ALM binding of project '<project_key>'
08:49:43.442 DEBUG: --> GET https://sonarcloud.io/api/alm_integration/is_project_bound?project=<project_key>
08:49:43.489 DEBUG: <-- 200 https://sonarcloud.io/api/alm_integration/is_project_bound?project=<project_key> (47ms, unknown-length body)
08:49:43.495 INFO: Detected project binding: BOUND
08:49:43.495 INFO: Check ALM binding of project '<project_key>' (done) | time=55ms
08:49:43.497 INFO: Load project pull requests
08:49:43.497 DEBUG: --> GET https://sonarcloud.io/api/project_pull_requests/list?project=<project_key>
08:49:43.572 DEBUG: <-- 200 https://sonarcloud.io/api/project_pull_requests/list?project=<project_key> (74ms, unknown-length body)
08:49:43.577 INFO: Load project pull requests (done) | time=80ms
08:49:43.579 INFO: Load branch configuration
08:49:43.582 INFO: Auto-configuring pull request 544
08:49:43.584 DEBUG: --> GET https://sonarcloud.io/api/alm_integration/show_pullrequest?project=<project_key>&pullrequestKey=544
08:49:43.861 DEBUG: <-- 401 https://sonarcloud.io/api/alm_integration/show_pullrequest?project=<project_key>&pullrequestKey=544 (276ms, unknown-length body)
08:49:43.884 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00007efd4b2f7270@67440de6 during JVM shutdown
08:49:43.888 INFO: ------------------------------------------------------------------------
08:49:43.889 INFO: EXECUTION FAILURE
08:49:43.889 INFO: ------------------------------------------------------------------------
08:49:43.890 INFO: Total time: 5.155s
08:49:43.922 INFO: Final Memory: 10M/40M
08:49:43.924 INFO: ------------------------------------------------------------------------
08:49:43.925 ERROR: Error during SonarScanner execution
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:131)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:60)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:54)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
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)
	... 34 more
Caused by: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator to check the permissions of the user the token belongs to
08:49:43.935 DEBUG: Cleanup org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$283/0x00007efd4b2f7270@67440de6 during JVM shutdown

Replaced project path with <project_path> and project key with <project_key>, so sensitive information is not shared.

I’m pretty perplexed with you getting a 401 error here.

On my side, I can reproduce a 404 error if the user SONAR_TOKEN was generated for no longer having Execute Analysis permissions on the project. Can you double check the project-level permissions?

Yes, i have checked this multiple times.

In the project => administration => permissions => everyone in the project has exectue analysis turned on.

Als in the organization => administration => permisisions => everyone has execute analysis turned on

organization => project management => permission => everyone has execute analysis turned on.

Also updated the sonar tokens of 2 of the projects.

So, I finally found the problem. The 401 was the right direction. Apparently the gitlab access token that was used, was expired.

This was not very obvious to find. Apparently when you open general settings in the project and look at the repository binding, it was not bound anymore.

Is it possible to have banner just like, java banner, that says your project binding is failing, or another way that is really it is not bound anymore?

1 Like

That’s a great idea. I’ll flag it for attention.