Error processing coverage reports with GitHub actions

Description

The reports are successfully uploaded from GitHub actions, but on codecov side I always receive “There was an error processing coverage reports.” without any additional info.

Commit SHAs

9fd2dc32fca9d0fa8d1517ae318d46fba8d50a15

Repository

CI/CD or Build URL

Uploader

Codecov report uploader 0.1.4

Codecov Output

2021-10-05T18:47:04.5361813Z ##[group]Run codecov/codecov-action@v2
2021-10-05T18:47:04.5362744Z with:
2021-10-05T18:47:04.5363535Z   name: EditMode
2021-10-05T18:47:04.5364360Z   flags: automated
2021-10-05T18:47:04.5365284Z   files: coverage-results/**/*.xml
2021-10-05T18:47:04.5366198Z ##[endgroup]
2021-10-05T18:47:04.6590455Z ==> linux OS detected
2021-10-05T18:47:05.4121863Z https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
2021-10-05T18:47:05.7079763Z ==> SHASUM file signed by key id 806bb28aed779869
2021-10-05T18:47:05.9688849Z ==> Uploader SHASUM verified (6e27851fbe06269589de24255b7010fba5bee9c2f9aa434c9a0f5414104f5ead  codecov)
2021-10-05T18:47:05.9691202Z ==> Running version latest
2021-10-05T18:47:06.0456007Z ==> Running version v0.1.4
2021-10-05T18:47:06.0515442Z [command]/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n EditMode -Q github-action-2.1.0 -f coverage-results/**/*.xml -F automated
2021-10-05T18:47:06.2578716Z [2021-10-05T18:47:06.256Z] ['info'] 
2021-10-05T18:47:06.2579823Z      _____          _
2021-10-05T18:47:06.2580616Z     / ____|        | |
2021-10-05T18:47:06.2581460Z    | |     ___   __| | ___  ___ _____   __
2021-10-05T18:47:06.2582330Z    | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
2021-10-05T18:47:06.2583180Z    | |___| (_) | (_| |  __/ (_| (_) \ V /
2021-10-05T18:47:06.2584030Z     \_____\___/ \__,_|\___|\___\___/ \_/
2021-10-05T18:47:06.2584541Z 
2021-10-05T18:47:06.2585389Z   Codecov report uploader 0.1.4
2021-10-05T18:47:06.2641218Z [2021-10-05T18:47:06.263Z] ['info'] => Project root located at: /home/runner/work/SpriteDicing/SpriteDicing
2021-10-05T18:47:06.2650228Z [2021-10-05T18:47:06.264Z] ['info'] -> No token specified or token is empty
2021-10-05T18:47:06.2690116Z [2021-10-05T18:47:06.268Z] ['info'] Searching for coverage files...
2021-10-05T18:47:06.3388222Z [2021-10-05T18:47:06.338Z] ['info'] => Found 2 possible coverage files:
2021-10-05T18:47:06.3389649Z   coverage-results/Report/Summary.xml
2021-10-05T18:47:06.3391211Z   coverage-results/workspace-opencov/EditMode/TestCoverageResults_0000.xml
2021-10-05T18:47:06.3393141Z [2021-10-05T18:47:06.338Z] ['info'] Processing /home/runner/work/SpriteDicing/SpriteDicing/coverage-results/Report/Summary.xml...
2021-10-05T18:47:06.3400986Z [2021-10-05T18:47:06.339Z] ['info'] Processing /home/runner/work/SpriteDicing/SpriteDicing/coverage-results/workspace-opencov/EditMode/TestCoverageResults_0000.xml...
2021-10-05T18:47:06.3462657Z [2021-10-05T18:47:06.345Z] ['info'] Detected GitHub Actions as the CI provider.
2021-10-05T18:47:06.3474025Z [2021-10-05T18:47:06.346Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.4&token=*******&branch=master&build=1308902694&build_url=https%3A%2F%2Fgithub.com%2FElringus%2FSpriteDicing%2Factions%2Fruns%2F1308902694&commit=9fd2dc32fca9d0fa8d1517ae318d46fba8d50a15&job=CI&pr=&service=github-actions&slug=Elringus%2FSpriteDicing&name=EditMode&tag=&flags=automated&parent=
2021-10-05T18:47:06.8605200Z [2021-10-05T18:47:06.859Z] ['info'] Uploading...
2021-10-05T18:47:07.0702467Z [2021-10-05T18:47:07.069Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/Elringus/SpriteDicing/commit/9fd2dc32fca9d0fa8d1517ae318d46fba8d50a15"}

Expected Results

Report processed.

Actual Results

The report is not processed with “There was an error processing coverage reports.”

1 Like

I was having the same issue – downgrading from codecov/codecov-action@v2 to codecov/codecov-action@v1 worked for me (suggesting it’s maybe a bug with the action?).

Note: codecov-action@v1 is set to be deprecated Feb 1, 2022

Also having this issue. Started experiencing it after the Github Actions we’re down yesterday (2021-10-05) for a few hours.

Worked around this for now by using the bash uploader ( [Deprecating] Bash Uploader ) though it’s marked deprecated on February 1st, 2022.

I was about to file the same bug report. This is happening with codecov/codecov-action@v2.1.0. The log says that the report has been uploaded successfully. But I noticed that the pushes on the web UI don’t have any data attached and show up as 0%. There’s also no PR statuses or comments anymore. This has been happening for 1-2 days: Code coverage done right.. On that page, it’s very clear when the reports stopped showing up but here’s the last “covered” commit Codecov and here’s the next one showing up with 0% Codecov.

Weird… Looking at the last processed report https://codecov.io/api/gh/aio-libs/aiohttp/download/build?path=v4/raw/2021-10-05/EF127050C22C1D1BFC2AB50DA5334704/ed49e882117150eb29650addfa232fd696633058/2a9a51ee-b63d-4ad5-958c-11155605c809.txt, I see that the files at the beginning are separated by a new line:

...
tests/autobahn/server/docker-compose.yml
tests/autobahn/server/fuzzingclient.json
tests/autobahn/server/server.py
<<<<<< network
# path=./coverage.xml
<?xml version="1.0" ?>
<coverage version="5.5" timestamp="1633414049761" lines-valid="9843" lines-covered="9600" line-rate="0.9753" branches-valid="3199" branches-covered="2997" branch-rate="0.9369" complexity="0">
...

But the first “bad” report https://api.codecov.io/upload/gh/aio-libs/aiohttp/download?path=v4/raw/2021-10-05/EF127050C22C1D1BFC2AB50DA5334704/13c26be82aa884994b52add6ec7a476b199fe910/11e82a90-e7b6-4810-ae11-fa5d9ed2bffb.txt has all of the file names concatenated with even no whitespace in between:

...tests/test_worker.pytools/bench-asyncio-write.pytools/check_changes.pytools/check_sum.pytools/cleanup_changes.pytools/drop_merged_branches.shtools/gen.pyvendor/http-parser<<<<<< network
# path=./coverage.xml
<?xml version="1.0" ?>
<coverage branch-rate="0.9442" branches-covered="2994" branches-valid="3171" complexity="0" line-rate="0.9768" lines-covered="9592" lines-valid="9820" timestamp="1633473294378" version="5.5">
...

Interestingly, when the XML section starts, it’s multilined.

Comparing the workflows that uploaded the reports (CI · aio-libs/aiohttp@ed49e88 · GitHub and Add custom RST roles extlinks to the docs setup (#6045) · aio-libs/aiohttp@13c26be · GitHub), the only difference I’ve noticed was that the bad reports were uploaded with a slightly newer version of the underlying uploader. This must be where the bug is coming from:

  ==> Running version latest
- ==> Running version v0.1.3
+ ==> Running version v0.1.4
  /home/runner/work/_actions/codecov/codecov-action/v2.1.0/dist/codecov -n  -Q github-action-2.1.0 -f 
./coverage.xml -F unit
  [2021-10-05T06:08:26.229Z] ['info'] 
       _____          _
      / ____|        | |
     | |     ___   __| | ___  ___ _____   __
     | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
     | |___| (_) | (_| |  __/ (_| (_) \ V /
      \_____\___/ \__,_|\___|\___\___/ \_/

-   Codecov report uploader 0.1.3
+   Codecov report uploader 0.1.4
  [2021-10-05T06:08:26.237Z] ['info'] => Project root located at: /home/runner/work/aiohttp/aiohttp

UPD: Looks like they’ve recently allowed specifying the version of the uploader in the action inputs: https://github.com/codecov/codecov-action/commit/72dfd4782ebb39e122c34a1c156c26573f9b412e.
I’ll try it out later and will report back.

UPD2: The bug seems to be in this line Comparing v0.1.3...v0.1.4 · codecov/uploader · GitHub.

UPD3: I’ve filed an upstream bug at [v0.1.4 regression] The file list in the uploaded reports is squashed · Issue #411 · codecov/uploader · GitHub.

UPD4: This has been fixed in the new release v0.1.5 (via fix: 🐛 Preserve LF in the report file names list by webknjaz · Pull Request #413 · codecov/uploader · GitHub) and I’ve confirmed that restarting the old GHA jobs will get this problem fixed since they’ll pull in the new uploader version.

2 Likes

Thank you again for the report, @webknjaz and sorry to all those affected. If your version of the uploader says it is 0.1.4, this is the issue. The corrected version of 0.1.5 has indeed been pushed .