- SonarQube Developer edition, version 10.1
- how is SonarQube deployed: zip
- Show projects in the dashboard / main page
- what have you tried so far to achieve this:
** restarting the service
** restarting the VM
** recreated the Elastic search data folder
After the VM was patched over the weekend, we noticed NO projects are being displayed at the main page.
The project data are there, just not showing by default.
The projects will only display if we choose a filter, like selecting a particular quality gate: Failed/Passed.
We have tried different ways (see above), including the searched answered in this forum by stopping the service, then delete the elastic search data folder, then start the service again.
But none working.
Welcome to the community!
So you’ve already tried
- stop the server
- restart the server
And that had no impact?
Are there any errors in your browser console? Anything in your server logs?
Yes, all attempted but not working, as shown below (we actually have over 30 projects):
Some of the projects will show if we click “Failed”/“Passed” filter of Quality Gate. But just none shows in the main page / dashboard.
Nothing really stands out with regards to errors etc. in the logs, except for the following 1 error log only:
2023.07.26 08:57:24 INFO ce[AYmPRUUXLzQhrDAK2IIt][o.s.c.t.s.ComputationStepExecutor] Index analysis | status=SUCCESS | time=2922ms
2023.07.26 08:57:24 INFO ce[AYmPRUUXLzQhrDAK2IIt][o.s.c.t.s.ComputationStepExecutor] Update need issue sync for branch | status=SUCCESS | time=0ms
2023.07.26 08:57:24 INFO ce[AYmPRUUXLzQhrDAK2IIt][o.s.c.t.s.ComputationStepExecutor] Compute total Project ncloc | status=SUCCESS | time=15ms
2023.07.26 08:57:24 WARN ce[AYmPRUUXLzQhrDAK2IIt][o.s.c.t.p.s.PersistPushEventsStep] Error during publishing push event
java.lang.NullPointerException: Cannot invoke "org.sonar.ce.task.projectanalysis.component.Component.getName()" because "component" is null
The projects list comes from a this query:
https://[your sonarqube instance]/api/components/search_projects?ps=50&facets=reliability_rating%2Csecurity_rating%2Csecurity_review_rating%2Csqale_rating%2Ccoverage%2Cduplicated_lines_density%2Cncloc%2Calert_status%2Clanguages%2Ctags%2Cqualifier&f=analysisDate%2CleakPeriodDate
Can you try the URL directly and see what comes back?
Somehow I did not receive your reply.
I just tried, and it did return quite some data, with all the missing projects there (trimmed for abbreviation & sensitivity):
So can you check your browser console to see what errors show up on the page?
I noticed there is a 404 not found status code to this call during the page load:
“https://[your sonarqube instance]/api/measures/search?projectKeys=[SOME-PROJECT-KEYS-HERE]&metricKeys=alert_status%2Cbugs%2Creliability_rating%2Cvulnerabilities%2Csecurity_rating%2Csecurity_hotspots_reviewed%2Csecurity_review_rating%2Ccode_smells%2Csqale_rating%2Cduplicated_lines_density%2Ccoverage%2Cncloc%2Cncloc_language_distribution%2Cprojects”
What happens when you call the URL manually?
Manually call the URL will be still the same 404 not found.
Ok, your most recent question pointed me to the right direction.
After checking the project keys one by one, I noticed that it might be related to the max length of a url is allowed by the browser.
We have about 38 projects and the total length of the full url exceeds 2110 characters. If I remove one of the project keys from the url and it goes below 2100 characters, it is working fine.
Where can we set the max url length in SonarQube web server?
After some googling, looks like the limit is imposed by the browser: http - What is the maximum length of a URL in different browsers? - Stack Overflow
I am not sure but you have might other customers that have come across the same issue?
No, we don’t have a limit on the URL length, but I believe IIS does, and I guess you’re using a Microsoft browser too?
Hi yes, we are using Edge on Windows 10. But we don’t use IIS. We just run the SonarQube service in Windows.
Do we have a solution/work around pls?
Well, officially we support Edge, so I’m going to flag this for the product team.
Thanks. Please prioritize as it is stopping us from using SonarQube properly
We tried to reproduce that on Windows + Edge with no luck.
From the investigation that I did looks like when Edge became Chromium-based (2020) the issue is gone. Can you please tell me which version of Edge you have?
Hi, we are using Windows 10 and both of the following browsers do NOT work:
- Version 115.0.1901.203 (Official build) (64-bit)
- Version 114.0.5735.199 (Official Build) (64-bit)
- Version 116.0.5845.97 (Official Build) (64-bit)
Are you absolutely sure that there’s nothing on your network between SonarQube and your browser? Because the Chrome URL length limit is 2Mb.
I really think you should talk to your network people.
Actually, it turned we used IIS as the reverse proxy so after increasing the the max query string and url as instructed in IIS: Changing maxQueryString and maxUrl | My Tec Bits , it is working fine now.
Thanks a lot and sorry for the trouble.