Sonar unable to sync with master branch post project deletion

We deleted a Sonar project (It’s a Java project) since it was not showing correct coverage . Post deletion, when it was recreated - it is only showing “Project’s Main Branch is not analyzed yet.- Configure Analysis”. Also, upon clicking on Configure Analysis or opening the project - We are getting an error message saying - “An error has occurred. Please contact your administrator”. Even admin is also getting the same error message.

Please help us resolve this.
Do let me know if you need any other information from our side to analyze this.

Hey there.

Any clues in the logs?

Hey @Colin, we donot see any error in logs. Sharing the redacted logs :

[INFO] 
[INFO] --- sonar-maven-plugin:3.11.0.3922:sonar (default-cli) @ abc ---
[INFO] Java 21.0.1 Amazon.com Inc. (64-bit)
[INFO] Linux 5.10.213-201.855.amzn2.x86_64 (amd64)
[INFO] User cache: [REDACTED]
[INFO] Communicating with SonarQube Server [REDACTED]
[INFO] Default locale: "en", source code encoding: "UTF-8"
[INFO] Load global settings
[INFO] Load global settings (done) | time=134ms
[INFO] User cache: [REDACTED]
[INFO] Load/download plugins
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=49ms
[INFO] Load/download plugins (done) | time=1325ms
[INFO] Process project properties
[INFO] Process project properties (done) | time=8ms
[INFO] Execute project builders
[INFO] Execute project builders (done) | time=1ms
[INFO] Project key: [REDACTED]
[INFO] Base dir: [REDACTED]
[INFO] Working dir: [REDACTED]
[INFO] Load project settings for component key: [REDACTED]
[INFO] Load project settings for component key: [REDACTED] (done) | time=20ms
[INFO] Load project branches
[INFO] Load project branches (done) | time=25ms
[INFO] Load branch configuration
[INFO] Auto detected BRANCH configuration with source master using com.github.mc1arke.sonarqube.plugin.scanner.autoconfiguration.BitbucketPipelinesAutoConfigurer
[INFO] Load branch configuration (done) | time=2ms
[INFO] Auto-configuring with CI 'Bitbucket Pipelines'
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=50ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=1074ms
[INFO] Load analysis cache
[INFO] Load analysis cache (404) | time=13ms
[INFO] Branch name: master
[WARNING] The property 'sonar.login' is deprecated and will be removed in the future. Please use the 'sonar.token' property instead when passing a token.
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=23ms
[INFO] Indexing files...
[INFO] Project configuration:
[INFO]   Excluded sources: [REDACTED]
[INFO] 28 files indexed
[INFO] 46 files ignored because of inclusion/exclusion patterns
[INFO] Quality profile for java: Custom
[INFO] Quality profile for xml: Sonar way
[INFO] ------------- Run sensors on module abcsvc
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=28ms
[INFO] Sensor JavaSensor [java]
[INFO] Configured Java source version (sonar.java.source): 17
[INFO] JavaClasspath initialization
[INFO] JavaClasspath initialization (done) | time=16ms
[INFO] JavaTestClasspath initialization
[INFO] JavaTestClasspath initialization (done) | time=10ms
[INFO] Server-side caching is enabled. The Java analyzer will not try to leverage data from a previous analysis.
[INFO] Using ECJ batch to parse 21 Main java source files with batch size 53 KB.
[INFO] Starting batch processing.
[INFO] The Java analyzer cannot skip unchanged files in this context. A full analysis is performed for all files.
[INFO] 100% analyzed
[INFO] Batch processing: Done.
[INFO] Did not optimize analysis for any files, performed a full analysis for all 21 files.
[WARNING] Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
[INFO] Using ECJ batch to parse 6 Test java source files with batch size 53 KB.
[INFO] Starting batch processing.
[INFO] 100% analyzed
[INFO] Batch processing: Done.
[INFO] Did not optimize analysis for any files, performed a full analysis for all 6 files.
[WARNING] Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
[INFO] No "Generated" source files to scan.
[INFO] Sensor JavaSensor [java] (done) | time=5092ms
[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] Importing 1 report(s). Turn your logs in debug mode in order to see the exhaustive list.
[INFO] Sensor JaCoCo XML Report Importer [jacoco] (done) | time=78ms
[INFO] Sensor CSS Rules [javascript]
[INFO] No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
[INFO] Sensor CSS Rules [javascript] (done) | time=1ms
[INFO] Sensor C# Project Type Information [csharp]
[INFO] Sensor C# Project Type Information [csharp] (done) | time=1ms
[INFO] Sensor C# Analysis Log [csharp]
[INFO] Sensor C# Analysis Log [csharp] (done) | time=10ms
[INFO] Sensor C# Properties [csharp]
[INFO] Sensor C# Properties [csharp] (done) | time=1ms
[INFO] Sensor SurefireSensor [java]
[INFO] parsing [REDACTED]
[INFO] Sensor SurefireSensor [java] (done) | time=101ms
[INFO] Sensor HTML [web]
[INFO] Sensor HTML [web] (done) | time=2ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1 source file to be analyzed
[INFO] 1/1 source file has been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=200ms
[INFO] Sensor TextAndSecretsSensor [text]
[INFO] 28 source files to be analyzed
[INFO] 28/28 source files have been analyzed
[INFO] Sensor TextAndSecretsSensor [text] (done) | time=104ms
[INFO] Sensor VB.NET Project Type Information [vbnet]
[INFO] Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
[INFO] Sensor VB.NET Analysis Log [vbnet]
[INFO] Sensor VB.NET Analysis Log [vbnet] (done) | time=13ms
[INFO] Sensor VB.NET Properties [vbnet]
[INFO] Sensor VB.NET Properties [vbnet] (done) | time=1ms
[INFO] Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor
[INFO] Sensor com.github.mc1arke.sonarqube.plugin.scanner.ScannerPullRequestPropertySensor (done) | time=0ms
[INFO] Sensor IaC Docker Sensor [iac]
[INFO] 0 source files to be analyzed
[INFO] 0/0 source files have been analyzed
[INFO] Sensor IaC Docker Sensor [iac] (done) | time=69ms
[INFO] ------------- Run sensors on project
[INFO] Sensor Analysis Warnings import [csharp]
[INFO] Sensor Analysis Warnings import [csharp] (done) | time=0ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=1ms
[INFO] Sensor Java CPD Block Indexer
[INFO] Sensor Java CPD Block Indexer (done) | time=37ms
[INFO] SCM Publisher is disabled
[INFO] CPD Executor 10 files had no CPD blocks
[INFO] CPD Executor Calculating CPD for 11 files
[INFO] CPD Executor CPD calculation finished (done) | time=9ms
[INFO] Analysis report generated in 60ms, dir size=421.4 kB
[INFO] Analysis report compressed in 58ms, zip size=131.4 kB
[INFO] Analysis report uploaded in 53ms

Please let me know if any other info is required.

I mean the server logs, which the documentation I linked describes. Not analysis logs.

@Colin What documentation are you referring to? Can you please attach it in the comments

Right here.