Error regarding token

Hello,

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).

Hi,

Are you still seeing this? We had an error last night and this morning related to SOTs, but that’s been resolved.

 
Ann

Hi @ganncamp ,

We still have the problem.

Hi,

Sorry for the delay in responding.

Your best bet here is to regenerate the token from a user you’re sure has permissions on the project.

 
Ann

Hello,

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 ?

Hi,

Fair point! I’ll pass this on.

 
Ann

Hi @Oodini,

thanks for providing this detail feedback.
I have created this ticket to improve these type of error messages.