We use the Sonar C++ wrapper with Jenkins.
We can’t do analysis anymore, and get the message:
sonar-scanner.bat : 17:27:37.479 ERROR 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
Nothing changed in the pipeline or the project (especially regarding sonar-project.properties).
The problem came actually from the token granted by Gitlab to SonarQube. This one was expired.
The error message is highly misleading. It is the same than the one emitted when the token generated in SonarQube (ie for jenkins) is expired. I guess a function is called for the two cases, and there is only one error handling. But the message is relevant only for one case. That must be fixed.
Also, is there a way to check the validity of the tokens before running any build and anlysis ?