I am using SonarQube Server - 2025.3. SonarQube is deployed using Docker. I am trying to get unit test coverage for my C++ project on sonar server which is built using msbuild. I am using opencppcoverage to generate coverage report in cobertura format.
It generated the report successfully.
However, sonar scanner is throwing error stating:
“ERROR: Caused by: Unknown report version: 0. This parser only handles version 1.”
I strongly believe that sonarqube supports cobertura reports.
I am using sonar.cfamily.cobertura.reportPaths parameter.
I am currently stuck and unable to proceed further.
Thanks Colin for reverting.
I am not passing report to sonar.coverageReportPaths, but instead I’m using sonar.cfamily.cobertura.reportPaths. Also, scanner_version is 9.0.2.104486, checked it with 10.2.0.117568 but still no success.
I feel my script is fine, can you review it? It looks something like this:
Output:
.
.
.
ERROR: Error during SonarScanner execution
ERROR: Error during parsing of the generic coverage report ‘coverage.xml’. Look at SonarQube documentation to know the expected XML format.
ERROR: Caused by: Unknown report version: 0. This parser only handles version 1.
.
.
.
Hi,
I am using sonar scanner CLI version 5.0.1.3006, can you confirm if it supports cobertura format coverage report?
Or can I use version 5.0.2.4997?
Does SonarScanner 5.0.2.4997 support cobertura format coverage report?
The Scanner version is not important in this context. SonarQube v2025.3 supports importing Cobertura reports for C/C++ code using the sonar.cfamily.cobertura.reportPaths property.
The main issue is that your analysis is failing because the scanner is trying to process a report that either shouldn’t be set or isn’t configured correctly. The next step is to identify where this configuration is set and adjust it (possibly remove it).