Inital setup "Project not found."

On inital setup Im following the exact commands for running sonar-scanner locally and I get the following error.

09:24:22.280 INFO: Analysis report generated in 491ms, dir size=216 KB
09:24:22.399 INFO: Analysis report compressed in 119ms, zip size=50 KB
09:24:22.400 INFO: Analysis report generated in /home/newman/repos/sentinal_vision_pe-sv-1200/.scannerwork/scanner-report
09:24:22.400 DEBUG: Upload report
09:24:25.376 DEBUG: POST 404 | time=2976ms
09:24:25.450 INFO: ------------------------------------------------------------------------
09:24:25.451 INFO: ------------------------------------------------------------------------
09:24:25.451 INFO: Total time: 50.794s
09:24:25.663 INFO: Final Memory: 35M/124M
09:24:25.664 INFO: ------------------------------------------------------------------------
09:24:25.664 ERROR: Error during SonarScanner execution
Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator

Ive quadrupplie checked the SONAR_TOKEN and the origanisation and key (These were populated in the sonarcloud commands taken from the web setup instructions → With other CI tools.

Commands provided from sonarcloud:

 1505  export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
 1506  curl --create-dirs -sSLo $HOME/.sonar/$
 1507  unzip -o $HOME/.sonar/ -d $HOME/.sonar/
 1508  export PATH=$SONAR_SCANNER_HOME/bin:$PATH
 1509  export SONAR_SCANNER_OPTS="-server"
 1510  curl --create-dirs -sSLo $HOME/.sonar/
 1511  unzip -o $HOME/.sonar/ -d $HOME/.sonar/
 1512  export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
 1513  build-wrapper-linux-x86-64 --out-dir bw-output cmake --build ./build --clean-first  --target all -- -j4
 1514  sonar-scanner   -Dsonar.organization=visionai   -Dsonar.projectKey=VisionAI_sentinal_vision_pe-sv-1200   -Dsonar.sources=.

I can also add that the bitbucket pipeline also fails with the same error so Im inclinded to think this is not a firewall issue. Also ran at home on my home internet to tripple check this was not a corparte firewall issue.

IMPORTANT NOTE!!! This project was previously setup as a public repo on another organisation for testing before we purchased licences. Is there anyone at SonarCloud who can check the authentication 404 comming back? Second day Ive spent on this and checked every setting.


Did you check

Can you confirm it’s set? With a correct value?


This issue was driving us crazy. Turns out my account was created with no permissions in SonarCloud. Could get the token but could not use it. I was not the admin who set it up. Settings were all good.

Strange defaults for new users…

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.