Current version: * Enterprise Edition* Version 9.4 (build 54424)
When we need to get the project’s badges as administrator we see this message:
“An error has occurred. Please contact your administrator”
The badges on the project show broken and the badge link is showing like this:
.[![Quality Gate Status].
As you can see the token is missing…neither we are able to retrive via api using one of the tokens entries taken directly from the database.
Neither we can renew them.We get same message: “An error has occurred. Please contact your administrator”
2022.08.02 11:29:41 ERROR web[A…xl4uVmul38Fz13][o.s.s.w.WebServiceEngine] Fail to process request http://sonarqube.company.org/api/project_badges/token?project=Gee%3AGeeTesting
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned by selectOne(), but found: 2
On the database, under project_badge_token table we see 2 entries linked to the same project_uuid.It shows same createdAt and UpdatedAt values but different token and uuid
We upgraded from 8.9 to 9.4 on July 7th, 2022 but we just started to notice today those issues in few projects , in fact just 32 badges are duplicated at this point , while we have more than 1000 projects.
The only thing I can see at this point besides the upgrade is that :
[Sonar way] BUILT-IN 1 was updated 26 days ago
Some of our projects impacted use that C# QualityProfile
Any idea why this could be impacting the project badges and duplicating them?
we are afraid we will have more duplications with the time.
What we will do in our side in the time being:
-remove the impacted projects from sonarqube using the deletion option and we will try to rescan them from scratch to see if they can get a new badge
-we don’t want to mess with the DB , removing one of the duplicated tokens in each project_uuid duplicated
- we will monitor if we get more duplications in the next days