Getting "The main branch of this project is empty" in Overview Section

I getting error “The main branch of this project is empty” when I go to the overview section. but if I go to code section I can see the folders and branches. This worked before and suddenly it stopped working for all projects. I checked some topics related to this error but couldnt find a solution.

Sonarqube - Community Edition Version 8.8 (build 42792)
Running - mvn sonar:sonar -Dsonar.projectKey=spring-rest-example -Dsonar.host.url=http://http://10.60.1.6/:9000 -Dsonar.login=XXX

If I go to the code section -

If I go to issues section

[INFO] Scanning for projects...
[INFO]
[INFO] --------------< spring-rest-example:spring-rest-example >---------------
[INFO] Building spring-rest-example 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.8.0.2131:sonar (default-cli) @ spring-rest-example ---
[INFO] User cache: /root/.sonar/cache
[INFO] SonarQube version: 8.8.0
[INFO] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
[WARNING] SonarScanner will require Java 11 to run, starting in SonarQube 9.x
[INFO] Load global settings
[INFO] Load global settings (done) | time=117ms
[INFO] Server id: BF41A1F2-AXivXC_VdjydSzJ-c9dZ
[INFO] User cache: /root/.sonar/cache
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=52ms
[INFO] Load/download plugins (done) | time=83ms
[INFO] Process project properties
[INFO] Process project properties (done) | time=11ms
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=1ms
[INFO] Project key: spring-rest-example
[INFO] Base dir: /install/spring-rest-example
[INFO] Working dir: /install/spring-rest-example/target/sonar
[INFO] Load project settings for component key: 'spring-rest-example'
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=65ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=1358ms
[INFO] Indexing files...
[INFO] Project configuration:
[INFO] 10 files indexed
[INFO] 0 files ignored because of scm ignore settings
[INFO] Quality profile for java: Sonar way
[INFO] Quality profile for jsp: Sonar way
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module spring-rest-example
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=20ms
[INFO] Sensor JavaSquidSensor [java]
[INFO] Configured Java source version (sonar.java.source): 8
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=16ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=2ms
[INFO] Java Main Files AST scan
[INFO] 4 source files to be analyzed
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=5ms
[INFO] 4/4 source files have been analyzed
[INFO] Java Main Files AST scan (done) | time=1432ms
[INFO] Java Test Files AST scan
[INFO] 0 source files to be analyzed
[INFO] 0/0 source files have been analyzed
[INFO] Java Test Files AST scan (done) | time=1ms
[INFO] Java Generated Files AST scan
[INFO] 0 source files to be analyzed
[INFO] 0/0 source files have been analyzed
[INFO] Java Generated Files AST scan (done) | time=5ms
[INFO] Sensor JavaSquidSensor [java] (done) | time=1742ms
[INFO] Sensor CSS Rules [cssfamily]
[INFO] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[INFO] Sensor CSS Rules [cssfamily] (done) | time=1ms
[INFO] Sensor JaCoCo XML Report Importer [jacoco]
[INFO] 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
[INFO] No report imported, no coverage information will be imported by JaCoCo XML Report Importer
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
[INFO] Sensor C# Project Type Information [csharp]
[INFO] Sensor C# Project Type Information [csharp] (done) | time=1ms
[INFO] Sensor C# Properties [csharp]
[INFO] Sensor C# Properties [csharp] (done) | time=1ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [/install/spring-rest-example/target/surefire-reports]
[INFO] Sensor SurefireSensor [java] (done) | time=2ms
[INFO] Sensor JavaXmlSensor [java]
[INFO] 4 source files to be analyzed
[INFO] 4/4 source files have been analyzed
[INFO] Sensor JavaXmlSensor [java] (done) | time=214ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=38ms
[INFO] Sensor XML Sensor [xml]
[INFO] 4 source files to be analyzed
[INFO] 4/4 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=153ms
[INFO] Sensor VB.NET Project Type Information [vbnet]
[INFO] Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
[INFO] Sensor VB.NET Properties [vbnet]
[INFO] Sensor VB.NET Properties [vbnet] (done) | time=1ms
[INFO] ------------- Run sensors on project
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=10ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=20ms
[INFO] SCM Publisher SCM provider for this project is: git
[INFO] SCM Publisher 9 source files to be analyzed
[INFO] SCM Publisher 9/9 source files have been analyzed (done) | time=94ms
[INFO] CPD Executor 1 file had no CPD blocks
[INFO] CPD Executor Calculating CPD for 4 files
[INFO] CPD Executor CPD calculation finished (done) | time=9ms
[INFO] Analysis report generated in 70ms, dir size=130 KB
[INFO] Analysis report compressed in 32ms, zip size=32 KB
[INFO] Analysis report uploaded in 115ms
[INFO] ANALYSIS SUCCESSFUL, you can browse http://130.61.177.226:9000/dashboard?id=spring-rest-example
[INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] More about the report processing at http://130.61.177.226:9000/api/ce/task?id=AXkgs0_O1ZqHAbs0IGJf
[INFO] Analysis total time: 5.480 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  6.965 s
[INFO] Finished at: 2021-04-30T02:54:52Z
[INFO] ------------------------------------------------------------------------

Welcome :slight_smile:

in such cases a rebuild of ES indices might help, see Troubleshooting | SonarQube Docs

  1. Stop SonarQube
  2. Delete the data/es7 directory
  3. Restart SonarQube

Also your sreenshot shows ‘Last analysis had 1 warning’, maybe this warning shows a cause ?

Gilbert

Thanks for the quick response. I stopped the docker and deleted the es7 directory and started the sonarqube docker image. but still the same issue.

The warning it gives - SonarScanner will require Java 11 to run, starting in SonarQube 9.x. Please upgrade the version of Java that executes the scanner.