Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java error when adding report HTML Azure Devops CI #76

Open
kocercan opened this issue Feb 5, 2021 · 2 comments
Open

Java error when adding report HTML Azure Devops CI #76

kocercan opened this issue Feb 5, 2021 · 2 comments

Comments

@kocercan
Copy link

kocercan commented Feb 5, 2021

CI Task

  - task: SonarQubePrepare@4
    inputs:
      SonarQube: 'SonarqubeDevTest-ErcanTest'
      scannerMode: 'MSBuild'
      projectKey: 'ErcanTest'
      projectName: 'ErcanTest'
      extraProperties: |
        sonar.zaproxy.reportPath=$(System.DefaultWorkingDirectory)/owaspzap/test-results.xml
        sonar.zaproxy.htmlReportPath=$(System.DefaultWorkingDirectory)/owaspzap/report.html

Error:
##[error]ERROR: Error during SonarScanner execution java.lang.UnsupportedOperationException: Can not add the same measure twice on [key=ErcanTest]: DefaultMeasure[component=[key=ErcanTest],metric=Metric[uuid=<null>,key=html_report,description=Report HTML,type=DATA,direction=0,domain=OWASP-ZAP,name=ZAP Report,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true,decimalScale=<null>],value=<html> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85) at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59) at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77) at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59) at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389) at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:386) at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:358) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:144) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123) at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72) at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66) at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) at com.sun.proxy.$Proxy0.execute(Unknown Source) at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) at org.sonarsource.scanner.cli.Main.execute(Main.java:112) at org.sonarsource.scanner.cli.Main.execute(Main.java:75) at org.sonarsource.scanner.cli.Main.main(Main.java:61) ERROR: ##[error]The SonarScanner did not complete successfully The SonarScanner did not complete successfully ##[error]11:40:02.815 Post-processing failed. Exit code: 1 11:40:02.815 Post-processing failed. Exit code: 1 ##[error]The process '/usr/bin/dotnet' failed with exit code 1

@victorwon
Copy link

victorwon commented Aug 24, 2021

We had exactly same error and it only happens on the html report. The upload of zaproxy xml report doesn't have this error.

Also it only happens on the Scanner for .NET as the other Java scanner can upload both xml and html report without any problem.

@ioritz1993
Copy link

We also have the same problem. The HTML load in the .NET scanner fails. On the other hand, the XML report loads correctly. It works with Maven in both XML and HTML. Is there any solution to this?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants