Error "There was an error processing coverage reports."

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

Description

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

Commit SHAs

149baede5cf893ed8489545b0312f34d7b536041

Repository

CI/CD or Build URL

Uploader

GItHub Action - codecov/codecov-action@v2

Codecov Output

with:
directory: output
files: coverage.xml
flags: unittests
verbose: true
env:
pythonLocation: /opt/hostedtoolcache/Python/3.10.0/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.0/x64/lib
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> 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:
coverage.xml
[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: https://github.com
[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: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.4&token=*******&branch=github-actions&build=1309828238&build_url=https%3A%2F%2Fgithub.com%2Fmjcaley%2Faiospamc%2Factions%2Fruns%2F1309828238&commit=149baede5cf893ed8489545b0312f34d7b536041&job=CI&pr=&service=github-actions&slug=mjcaley%2Faiospamc&name=&tag=&flags=unittests&parent=
[2021-10-06T00:06:42.926Z] [‘verbose’] Passed token was 0 characters long
[2021-10-06T00:06:42.926Z] [‘verbose’] https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.4&branch=github-actions&build=1309828238&build_url=https%3A%2F%2Fgithub.com%2Fmjcaley%2Faiospamc%2Factions%2Fruns%2F1309828238&commit=149baede5cf893ed8489545b0312f34d7b536041&job=CI&pr=&service=github-actions&slug=mjcaley%2Faiospamc&name=&tag=&flags=unittests&parent=
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.
https://storage.googleapis.com/codecov/v4/raw/2021-10-06/637B072257BF2CF06C936342CDC8D934/149baede5cf893ed8489545b0312f34d7b536041/963f58e5-beda-4ff0-b018-f557616a4cb0.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20211006%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20211006T000643Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=d25c6a6ac2f71fbd15b0ced1e796b073d9da9ba0f91d6176717b61a12c4db3c8
[2021-10-06T00:06:44.031Z] [‘verbose’] https://storage.googleapis.com/codecov/v4/raw/2021-10-06/637B072257BF2CF06C936342CDC8D934/149baede5cf893ed8489545b0312f34d7b536041/963f58e5-beda-4ff0-b018-f557616a4cb0.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20211006%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20211006T000643Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=d25c6a6ac2f71fbd15b0ced1e796b073d9da9ba0f91d6176717b61a12c4db3c8
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.

Thanks!

1 Like

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

I’m getting the same issue while migrating my project to Java 17. I’m upgrading the jacoco version to 0.8.10 as well. What could be the issue?

The fix is availabe in codecov-action@v2 right?

@gbltggn please open a new topic for this.