SonarQube reporting issues but displaying "We couldn't find any results matching selected criteria."

Hello,

We recently had a user that pushed some changes to a new branch and the corresponding sonarqube scan contained “1 New Bug” and “1 New Vulnerabilities”. See the following screenshot:

However, when they click on any of the issues they see the following:

We couldn't find any results matching selected criteria.
Try to change filters to get some results.

Any insight on what might be going on here?

Sonarqube version 8.4.1.

Thanks,
Cameron

Edit: Fixed formatting issues.

1 Like

Other symptoms include certain projects not showing up in search results, and when we favorite a project it does not show up in our favorites.
We have checked the database and the values are present though.
We were wondering if an elasticsearch reindex (deleting sonar/data/es6) would help us.
Thanks!
James

1 Like

we’ve removed the sonar/data/es6/nodes folder and the index is rebuilding, but it is very slow. We are showing 27615 pending tasks, and the rate seems to be one task every 5 minutes. We’re attaching our ce.log showing the log lines every 5 minutes. Is there any way to speed this up? We appreciate any help here. Thank you
James
sonar_ce.log (15.5 KB)

Is anyone available to help? Unfortunately we haven’t made much progress on why our search is broken and why the Issues tab shows 0 bugs even though the Overview says they exist. Thank you

Hi @jamesdag and @cameronpkeith,

Can you try SonarQube 8.6 and see if you still have this issue?

Joe

I am encountering this same exact issue, but with version 8.9.6. Seems ridiculous that it’s still present. Has there been a fix for this yet?

Hi @jamesdag ,

Apologies for the late reply. You can speed up the project reload process by ensuring your rebuild indexes and refresh statistics on your database. Please speak with your DBA on how to do these actions. Then perform the ES reindex once more and it should be faster.

Hi John,

If you speaking about the strange behavior as mentioned in the OP, then it is an issue we are progressively working on to improve ES index stability. Currently, as of SonarQube 9.8, we provide a special web API to perform ES reindex on a single project (instead of the entire SonarQube instance via deletion of $SQ_HOME/data/es7 folder and restarting SonarQube), POST api/issues/reindex (see [SONAR-17497] - Jira for more info):

You can use this API to quickly reindex just that specific project, which should fix the error with missing issues once clicking on it in the UI.