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 validate checksum#
Starting on version 13.0.0 the get.sh
script automatically validates the checksum of the downloaded Codacy Coverage Reporter binary. This requires having either the sha512sum
or shasum
command on the operating system where you're running the script.
If you're getting this error while uploading your coverage data to Codacy, install the correct version of sha512sum
or shasum
for the operating system that you're using.
You can also skip validating the checksum of the binary by defining the following environment variable, however, Codacy doesn't recommend this:
export CODACY_REPORTER_SKIP_CHECKSUM=true
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 <coverage report file name>
Report generated an empty result while uploading C# coverage data#
If you're 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 coverage data#
If you're getting a com.fasterxml.jackson.core.JsonParseException
error while uploading your coverage data to Codacy it means that your coverage report is too big and that Codacy Coverage Reporter hit a limit of 10 MB when uploading the coverage data to Codacy.
There are some ways you can solve this:
-
Split your coverage reports into smaller files and upload them to Codacy one at a time.
-
If you're 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're 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're 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?
255 characters left
We're sorry to hear that. Please let us know what we can improve:
255 characters left
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.