I am writing because of an issue related to the integration of our code base with Sonar Cloud analysis via the Azure DevOps pipeline.
Recently, we encountered a disruption where the integration ceased functioning, resulting in error messages within our pipelines.
##[error]ERROR: Error during SonarScanner execution
ERROR: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator
ERROR:
ERROR: Error during SonarScanner execution
ERROR: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator
ERROR:
##[error]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
After a thorough investigation, we made the decision to reinstate my account as an administrator. Remarkably, this action resolved the problem, and our pipelines are now operational once again.
However, we are curious about the underlying cause. Was this resolution merely coincidental, or is there a specific reason why removing someone from the admin list leads to pipeline failures?
Thank you for your prompt attention to this matter.
Best regards,
Augustyn Binkowski
Senior Software Engineer @ DOCOsoft
P.S. Rest assured that the keys and tokens remain unchanged and have not been regenerated.
Do I correctly infer that the token in use was generated from your account? And that analysis worked up until you were removed from the administrators’ list?
If so, then this was a question of permissions. Presumably, the Admin group has Execute Analysis permission at the global level. And your individual account does not.
So removing you from the admins group removed your ability to Execute Analysis. Restoring you restored that permission.
Thanks for your quick response. The account used to generate the tokens was a company-generic DevOps account. I was the one who created those projects inside the Sonar Cloud portal. I’ve not generated/re-generated any access tokens I only copied the values to make it work. So please correct me if I’m wrong. Do you suggest re-generating/changing those tokens by using another account that will stay on the admin list?
Best regards,
Augustyn Binkowski
Senior Software Engineer @ DOCOsoft
Thanks for the screenshot. It confirms that you don’t have analyze permissions as an individual. I think the only thing left to do here is repeat the situation: remove yourself from owners again & verify analysis again fails.
And then re-generate a token from your technical user and configure it into analysis. Because all the evidence points to the current token being from your account.