SonarQube = 10.6.0
Sonarqube for Angular Project Issue - Genrating Report for Angular Project
I’m implementing SonarQube for our existing Angular project for the first time, and while I’m testing it locally, I’m encountering an issue.
TRIED: I created a new sample project, and it’s working fine with the report generated, but in our existing project, I’m facing this issue
sonar-project.properties
sonar.host.url=http://localhost:9000/
sonar.projectKey=Angular
sonar.projectName=Angular
sonar.projectVersion=1.0
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.token=sqp_e7ac2b6904106334d5077c05bdb6f284917f8cd7
logs
[INFO] ScannerEngine: CPD Executor 280 files had no CPD blocks
[INFO] ScannerEngine: CPD Executor Calculating CPD for 402 files
[INFO] ScannerEngine: CPD Executor CPD calculation finished (done) | time=511ms
[INFO] ScannerEngine: SCM revision ID '4b1829f4017a647c96750e913e39c2e91e9e7a9a'
[INFO] ScannerEngine: Analysis report generated in 878ms, dir size=8.4 MB
[ERROR] ScannerEngine: Error during SonarScanner Engine execution
java.lang.IllegalStateException: Unable to prepare analysis report
at org.sonar.scanner.report.ReportPublisher.generateReportFile(ReportPublisher.java:193)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:158)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:181)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:158)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:181)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringScannerContainer.doAfterStart(SpringScannerContainer.java:351)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:144)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:226)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:149)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: java.io.FileNotFoundException: D:\Project\kb_md_web\.sonar\scanner-report\source-262.txt (Operation did not complete successfully because the file contains a virus or potentially unwanted software)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at org.sonar.api.utils.ZipUtils.doZip(ZipUtils.java:257)
at org.sonar.api.utils.ZipUtils.doZipDir(ZipUtils.java:269)
at org.sonar.api.utils.ZipUtils.zipDir(ZipUtils.java:229)
at org.sonar.scanner.report.ReportPublisher.generateReportFile(ReportPublisher.java:188)
... 13 common frames omitted
[ERROR] Bootstrapper: An error occurred: Error: Scanner engine failed with code 1