Skip to content
This documentation applies to Codacy Self-hosted v4.1.0

For the latest updates and improvements, see the latest Cloud documentation instead.

Troubleshooting common issues#

The sections below provide instructions or workarounds to overcome common issues while using Codacy Coverage Reporter.

Can't guess any report due to no matching#

Codacy Coverage Reporter automatically searches for coverage reports matching the file name conventions for supported formats.

However, if Codacy Coverage Reporter does not find your coverage report, you can explicitly define the report file name with the flag -r. For example:

bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
    -r <my report>

Report generated an empty result while uploading C# coverage data#

If you are using dotCover to generate coverage reports for your C# projects, you must use the dotCover detailedXML report format as follows:

dotCover.exe cover ... --reportType=DetailedXml

JsonParseException while uploading C# coverage data#

If you are using dotCover to generate coverage reports for your C# projects, you should exclude xUnit files from the coverage analysis as follows:

dotCover.exe cover ... /Filters=-:xunit*

By default, dotCover includes xUnit files in the coverage analysis and this results in larger coverage reports. This filter helps ensure that the resulting coverage data does not exceed the size limit accepted by the Codacy API when uploading the results.

MalformedInputException while parsing report#

If you get a java.nio.charset.MalformedInputException when running the Codacy Coverage Reporter it means that the coverage report includes an unsupported character, perhaps on one of your source code file names.

For maximum compatibility of your coverage reports with the Codacy Coverage Reporter, make sure that your coverage reports use UTF-8 encoding or remove any special characters from the reports.

SubstrateSegfaultHandler caught signal 11#

If you are experiencing segmentation faults when uploading the coverage results due to oracle/graal#624, execute the following command before running the reporter, as a workaround:

echo "$(dig +short api.codacy.com | tail -n1) api.codacy.com" >> /etc/hosts

coverage-xml/index.xml generated an empty result#

If you are using PHPUnit version 5 or above to generate your coverage report, you must output the report using the Clover format. Codacy Coverage Reporter supports the PHPUnit XML format only for versions 4 and older.

To change the output format replace the flag --coverage-xml <dir> with --coverage-clover <file> when executing phpunit.

See PHPUnit command-line documentation for more information.

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified May 25, 2021