Projects disappeared in dashboard/main page

Must-share information:

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

Any ideas?

Hi,

Welcome to the community!

So you’ve already tried

  • stop the server
  • delete $SONARQUBE-HOME/data/es8
  • restart the server

And that had no impact?

Are there any errors in your browser console? Anything in your server logs?

 
Ann

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
	at org.sonar.ce.task.projectanalysis.pushevent.PushEventFactory.raiseSecurityHotspotClosedEvent(PushEventFactory.java:196)
	at org.sonar.ce.task.projectanalysis.pushevent.PushEventFactory.raiseSecurityHotspotEvent(PushEventFactory.java:107)
	at org.sonar.ce.task.projectanalysis.pushevent.PushEventFactory.raiseEventOnIssue(PushEventFactory.java:79)
	at org.sonar.ce.task.projectanalysis.step.PersistPushEventsStep.execute(PersistPushEventsStep.java:63)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:79)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:70)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:57)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:75)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:74)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

Hi,

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?

 
Ann

Hi,

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

Hi,

So can you check your browser console to see what errors show up on the page?

 
Ann

Hi,

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”

Hi,

What happens when you call the URL manually?

 
Ann

Hi,

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?

Hi,

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?

 
Ann

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?

Hi,

Well, officially we support Edge, so I’m going to flag this for the product team.

 
Ann

Thanks. Please prioritize as it is stopping us from using SonarQube properly

Hi,

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?

Thank you,
Viktor

1 Like

Hi, we are using Windows 10 and both of the following browsers do NOT work:

Edge:

  • Version 115.0.1901.203 (Official build) (64-bit)

Chrome:

  • Version 114.0.5735.199 (Official Build) (64-bit)
  • Version 116.0.5845.97 (Official Build) (64-bit)

Hi,

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.

 
Ann

1 Like

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.

5 Likes