Error "There was an error processing coverage reports."

Please search for similar issues before creating a ticket.
All fields below are required.


“There was an error processing coverage reports.” when using CodeCov GitHub action.

Commit SHAs



CI/CD or Build URL


GItHub Action - codecov/codecov-action@v2

Codecov Output

directory: output
files: coverage.xml
flags: unittests
verbose: true
pythonLocation: /opt/hostedtoolcache/Python/3.10.0/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib
==> linux OS detected
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (6e27851fbe06269589de24255b7010fba5bee9c2f9aa434c9a0f5414104f5ead codecov)
==> Running version latest
==> Running version v0.1.4
/home/runner/work/actions/codecov/codecov-action/v2/dist/codecov -n -Q github-action-2.1.0 -f coverage.xml -F unittests -s output -v
[2021-10-06T00:06:42.898Z] [‘info’]
_____ _
/ | | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / ` |/ _ / / _ \ \ / /
| |
| (
) | (
| | __/ (
| (
) \ V /
____/ _,|_|____/ _/

Codecov report uploader 0.1.4
[2021-10-06T00:06:42.905Z] [‘info’] => Project root located at: /home/runner/work/aiospamc/aiospamc
[2021-10-06T00:06:42.906Z] [‘info’] → No token specified or token is empty
[2021-10-06T00:06:42.906Z] [‘verbose’] Start of network processing…
[2021-10-06T00:06:42.906Z] [‘verbose’] Searching for files in /home/runner/work/aiospamc/aiospamc
[2021-10-06T00:06:42.910Z] [‘info’] Searching for coverage files…
[2021-10-06T00:06:42.920Z] [‘info’] => Found 1 possible coverage files:
[2021-10-06T00:06:42.920Z] [‘verbose’] End of network processing
[2021-10-06T00:06:42.920Z] [‘info’] Processing output/coverage.xml…
[2021-10-06T00:06:42.924Z] [‘info’] Detected GitHub Actions as the CI provider.
[2021-10-06T00:06:42.924Z] [‘verbose’] → Using the following env variables:
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_ACTION: __codecov_codecov-action
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_HEAD_REF:
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_REF: refs/heads/github-actions
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_REPOSITORY: mjcaley/aiospamc
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_RUN_ID: 1309828238
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_SERVER_URL:
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_SHA: 149baede5cf893ed8489545b0312f34d7b536041
[2021-10-06T00:06:42.924Z] [‘verbose’] GITHUB_WORKFLOW: CI
[2021-10-06T00:06:42.926Z] [‘info’] Pinging Codecov:*******&branch=github-actions&build=1309828238&
[2021-10-06T00:06:42.926Z] [‘verbose’] Passed token was 0 characters long
[2021-10-06T00:06:42.926Z] [‘verbose’]
Content-Type: ‘text/plain’
Content-Encoding: ‘gzip’
X-Reduced-Redundancy: ‘false’
[2021-10-06T00:06:44.031Z] [‘verbose’] Returned upload url: Code coverage done right.
[2021-10-06T00:06:44.031Z] [‘verbose’]
Content-Type: ‘text/plain’
Content-Encoding: ‘gzip’
[2021-10-06T00:06:44.031Z] [‘info’] Uploading…
[2021-10-06T00:06:44.267Z] [‘info’] {“status”:“success”,“resultURL”:“Code coverage done right.”}

Expected Results

Code coverage successfully processed.

Actual Results

Error after upload.

Additional Information

I’ve confirmed that the coverage file isn’t empty. It’s generated by pytest-cov so it’s using the XML output (Cobertura I think). I’ve tried even limiting it to one run (OS/Python version combination).

Thanks for the help!

@mjcaley it looks like this fixed your issue. Was it just that you were archiving the coverage file before uploading?

Actually it was a bug in the Codecov uploader where it wasn’t adding a newline within the request. I found the pull request in another thread here.


1 Like

@mjcaley oh! I saw that PR, what an incredible fix, thanks for that!