codecov-action
codecov-action copied to clipboard
Error: failed to properly upload
Hi,
We are getting failed to properly upload errors in our codecov reports. This is a link to a failed report: test.
The error looks like this:
[2021-12-09T21:21:20.606Z] ['verbose'] parent
76
[2021-12-09T21:21:20.607Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.13&token=*******&branch=iwahbe%2Fignore-ambient-plugins-exclude-language-plugins&build=1560590304&build_url=https%3A%2F%2Fgithub.com%2Fpulumi%2Fpulumi%2Factions%2Fruns%2F1560590304&commit=0d49bcd7594916ab15876197c806c30cd5312477&job=.github%2Fworkflows%2Frun-build-and-acceptance-tests.yml&pr=8576&service=github-actions&slug=pulumi%2Fpulumi&name=&tag=&flags=&parent=
77
[2021-12-09T21:21:20.607Z] ['verbose'] Passed token was 0 characters long
78
[2021-12-09T21:21:20.607Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-2.1.0-uploader-0.1.13&branch=iwahbe%2Fignore-ambient-plugins-exclude-language-plugins&build=1560590304&build_url=https%3A%2F%2Fgithub.com%2Fpulumi%2Fpulumi%2Factions%2Fruns%2F1560590304&commit=0d49bcd7594916ab15876197c806c30cd5312477&job=.github%2Fworkflows%2Frun-build-and-acceptance-tests.yml&pr=8576&service=github-actions&slug=pulumi%2Fpulumi&name=&tag=&flags=&parent=
79
Content-Type: 'text/plain'
80
Content-Encoding: 'gzip'
81
X-Reduced-Redundancy: 'false'
82
[2021-12-09T21:21:20.804Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - Not Found - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
83
[2021-12-09T21:21:20.805Z] ['verbose'] The error stack is: Error: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - Not Found - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
84
at main (/snapshot/repo/dist/src/index.js)
85
at processTicksAndRejections (node:internal/process/task_queues:96:5)
86
[2021-12-09T21:21:20.805Z] ['verbose'] End of uploader: 431 milliseconds
87
Error: Codecov: Failed to properly upload: The process '/Users/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255
It looks like the same issue as https://github.com/codecov/codecov-action/issues/595. Any help would be appreciated.
Hi,
I just got the same issue. Try regenerating a new secret token and change it in your settings > secrets.
Hope this helps.
@clementchadebec our repo is public, and we don't have a secret configured
I'm getting a similar thing to codecov/codecov-action#595 specifically on windows https://github.com/SwagLyrics/SwSpotify/runs/4785632314?check_suite_focus=true
D:\a\_actions\codecov\codecov-action\v2\dist\codecov.exe -n "" -Q github-action-2.1.0 -Z -C 003e91531c22bc0514de5fbaf7e28e394ec175d4
[2022-01-12T06:28:57.858Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.1.14
[2022-01-12T06:28:57.886Z] ['info'] => Project root located at: D:/a/SwSpotify/SwSpotify
[2022-01-12T06:28:57.887Z] ['info'] -> No token specified or token is empty
[2022-01-12T06:28:57.910Z] ['info'] Searching for coverage files...
[2022-01-12T06:28:57.990Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
Error: Codecov: Failed to properly upload: The process 'D:\a\_actions\codecov\codecov-action\v2\dist\codecov.exe' failed with exit code 4294967295
Run codecov/codecov-action@v2
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (1e8637b5bdc0b03b67fda9d069fd5ea3673027cb709f06bc4bc9d120e0b086ef codecov)
==> Running version latest
==> Running version v0.1.9
...
[2022-01-17T03:26:40.265Z] ['verbose'] Start of uploader: 1642390000265...
[2022-01-17T03:26:40.270Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.1.14
...
[2022-01-17T03:26:40.277Z] ['info'] -> No token specified or token is empty
[2022-01-17T03:26:40.277Z] ['verbose'] Start of network processing...
...
[2022-01-17T03:26:40.283Z] ['info'] Searching for coverage files...
[2022-01-17T03:26:40.311Z] ['verbose'] Preparing to clean the following coverage paths:
[2022-01-17T03:26:40.311Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
[2022-01-17T03:26:40.311Z] ['verbose'] The error stack is: Error: Error while cleaning paths. No paths matched existing files!
at cleanCoverageFilePaths (/snapshot/repo/dist/src/helpers/files.js)
at main (/snapshot/repo/dist/src/index.js)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-01-17T03:26:40.311Z] ['verbose'] End of uploader: 46 milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255
Anyone has solved the issue? We are getting the same error. Our repository is also public. See this.
I resolved the issue by changing the report extension to xml. I used to use coverage.out file.
We are getting this error on version v0.1.16, but version: "v0.1.15" in the action works fine:
- name: Upload coverage results to Codecov.io
uses: codecov/codecov-action@v2
with:
token: ${{secrets.CODECOV_TOKEN}}
version: "v0.1.15"
Had to rerun the workflow. It's up and running. Is it a Heisenbug?
I had the same issue since today, generating a new token was pointless.
Using an explicit version here with 0.1.15 was actually the only workaround I found.
See Sonia-corporation/stale@d466fb2 (#388).
Thank you very much @rafaelcalpena!
Make sure to run CodeCov with a version of PHPUnit that supports coverage for the used PHP version (e.g. not 8.5 with PHP8). This was the issue in our case.
We get this 404 error from time to time. Rather annoying if you have fail_ci_if_error: true
There seem to be a few different "fixes" for this being posted here, but we're just having this problem intermittently for no apparent reason.
Using with.token parameter seems to fix the problem.
I ran into this error message on one project while having no errors on another similar project. Like many of the people here my errors look like this:
[2022-03-07T16:17:56.552Z] ['verbose'] Preparing to clean the following coverage paths: ./clover.xml
[2022-03-07T16:17:56.552Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
[2022-03-07T16:17:56.553Z] ['verbose'] The error stack is: Error: Error while cleaning paths. No paths matched existing files!
at cleanCoverageFilePaths (/snapshot/repo/dist/src/helpers/files.js)
at main (/snapshot/repo/dist/src/index.js)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-03-07T16:17:56.553Z] ['verbose'] End of uploader: [39](https://github.com/nickwest/blossom-php/runs/5451500259?check_suite_focus=true#step:6:39) milliseconds
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255
The final error message is a bit misleading though. The problem wasn't with the upload so much as the code coverage output file was missing, so there was nothing to process and upload. In my case one project had an older version of PHPUnit which couldn't generate the coverage output with my setup.
The key error line is:
[2022-03-07T16:17:56.552Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
Then in previous steps I was able to diagnose why that file was missing.
A good "fix" for this might be to change the final error message in this action so it more prominently displays that the code coverage file was missing, rather than just that there was an upload error .
Send your test coverage file to /home/runner, using pytest as exemple:
pytest --cov . --cov-report xml:/home/runner/coverage.xml
and pass this directory to codecov files argument:
- uses: actions/checkout@master
- uses: codecov/codecov-action@v2
with:
files: /home/runner/coverage.xml
The test step is probably cleaning the file before codecov start.
I'm having the same issue. Are the code-cove folks on this? what's the status? Some times the server returns 404 :(
I'm having the same issue. Are the code-cove folks on this? what's the status? Some times the server returns 404 :(
I just stopped using it.
Using
with.tokenparameter seems to fix the problem.
Would you mind giving a detailed example?
We are getting this error on version
v0.1.16, butversion: "v0.1.15"in the action works fine:- name: Upload coverage results to Codecov.io uses: codecov/codecov-action@v2 with: token: ${{secrets.CODECOV_TOKEN}} version: "v0.1.15"
had the same problem and tried to downgrade but now I have this error
_____ _
[17](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:17)
/ ____| | |
[18](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:18)
| | ___ __| | ___ ___ _____ __
[19](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:19)
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
[20](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:20)
| |___| (_) | (_| | __/ (_| (_) \ V /
[21](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:21)
\_____\___/ \__,_|\___|\___\___/ \_/
[22](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:22)
[23](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:23)
Codecov report uploader 0.1.15
[24](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:24)
[2022-04-20T03:55:00.699Z] ['info'] => Project root located at: /home/runner/work/clcert-beacon-observer/clcert-beacon-observer
[25](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:25)
[2022-04-20T03:55:00.700Z] ['info'] -> No token specified or token is empty
[27](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:27)
[2022-04-20T03:55:00.707Z] ['info'] Searching for coverage files...
[28](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:28)
[2022-04-20T03:55:00.740Z] ['info'] Warning: Some files located via search were excluded from upload.
[29](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:29)
[2022-04-20T03:55:00.740Z] ['info'] If Codecov did not locate your files, please review https://docs.codecov.com/docs/supported-report-formats
[30](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:30)
[2022-04-20T03:55:00.740Z] ['error'] There was an error running the uploader: No coverage files located, please try use `-f`, or change the project root with `-R`
[29](https://github.com/elbraulio/clcert-beacon-observer/runs/6088864011?check_suite_focus=true#step:5:29)
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255
Having this issue for private repo. It was because the GitHub action secrets token can be read in the plugin step.
Instead, I put the env variable CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} to the job level. It works then.
Example:
This doesn't work
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 12.x ]
...
# Running tests
name: Running Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: |
npm install
- name: Run Test
run: npm run test
- name: Upload code coverage to codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
This works
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 12.x ]
...
# Running tests
name: Running Tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
run: |
npm install
- name: Run Test
run: npm run test
- name: Upload code coverage to codecov
uses: codecov/codecov-action@v3
Getting these errors today, public repo on GitHub Actions https://github.com/ansible-collections/community.hashi_vault/runs/6353992475?check_suite_focus=true#step:5:95
Edit: Started working again after a few hours 🤷♂️
Having this issue for private repo. It was because the GitHub action secrets token can be read in the plugin step.
Instead, I put the env variable
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}to the job level. It works then.Example:
This doesn't work
name: Test on: [push, pull_request] jobs: test: strategy: matrix: os: [ ubuntu-20.04 ] node-version: [ 12.x ] ... # Running tests name: Running Tests on ${{ matrix.os }} runs-on: ${{ matrix.os }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Install packages run: | npm install - name: Run Test run: npm run test - name: Upload code coverage to codecov uses: codecov/codecov-action@v3 with: token: ${{secrets.CODECOV_TOKEN}}This works
name: Test on: [push, pull_request] jobs: test: strategy: matrix: os: [ ubuntu-20.04 ] node-version: [ 12.x ] ... # Running tests name: Running Tests on ${{ matrix.os }} runs-on: ${{ matrix.os }} env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Node uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Install packages run: | npm install - name: Run Test run: npm run test - name: Upload code coverage to codecov uses: codecov/codecov-action@v3
This fixed it for me (Private repo)
I mentioned above that changing around where the coverage token was stored worked for me. However, it only worked very temporarily.
I'm encountering this issue off-and-on across multiple repos, and have been for many months now. Here's some more details I can deduce about the nature of it.
- As @thomasrockhu mentioned here, it appears to be an issue with rate-limiting. Installing the app does not alleviate the issue.
- As far as I can tell, when run on a PR the action almost always fails the first time. Re-running the workflow sometimes resolves the issue - but not always.
- I can't seem to track down the exact factors that cause the error, they seem to be different on a per-day, per-repository basis. This reinforces my thinking in number 1.
- It could be related to this, since it doesn't seem to be passing the token in the first place. Not sure, as it's failing only sometimes.
@BobDotCom mind porting over to the community boards. What I'm missing the most here is the output from Codecov during the CI run and maybe a commit SHA to help debug
I also observe flaky behavior in two public repos:
https://github.com/blockprotocol/blockprotocol/actions/runs/3183425990/jobs/5190622286#step:12:35
[2022-10-04T15:38:02.809Z] ['error'] There was an error running the uploader: Error uploading
to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 -
{'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with
the Codecov repository upload token to resolve issue.', code='not_found')}
https://github.com/prettier/prettier/actions/runs/3174772073/jobs/5171981340#step:7:800
[2022-10-03T14:16:53.682Z] ['error'] There was an error running the uploader: Error uploading
to https://codecov.io: HeadersTimeoutError: Headers Timeout Error
The 404 error has been happening a lot in the past week or so
Same thing happening for us in a private repo with action v3
[2022-10-05T00:44:00.417Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
@naquarius are you using a token? private repos must use the Codecov upload token.
@naquarius are you using a token? private repos must use the Codecov upload token.
@thomasrockhu-codecov Yes I am! I've tried both the project level config and step level as follows:
jobs:
build:
name: Build and lint
...
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage/clover.xml
verbose: true
and
jobs:
build:
name: Build and lint
...
steps:
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/clover.xml
verbose: true
neither approach works...
@naquarius could you share the output in CI from Codecov? Usually there's a line that says how many characters are in the token supplied
@thomasrockhu-codecov it does say the token length is 0, we double checked the token exist as part of our repo config, am i missing a step somewhere?
[2022-10-05T00:44:00.061Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token=*******&branch=codecov&build=3186451445&build_url=https%3A%2F%2Fgithub.com%2Faquaxyz%2Faqua-app%2Factions%2Fruns%2F3186451445&commit=048eb3245d7d7e410673afe6b9b0e7b67c5c8c77&job=frontend&pr=2015&service=github-actions&slug=aquaxyz%2Faqua-app&name=&tag=&flags=&parent=
[2022-10-05T00:44:00.061Z] ['verbose'] Passed token was 0 characters long
[2022-10-05T00:44:00.061Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&branch=codecov&build=3186451445&build_url=https%3A%2F%2Fgithub.com%2Faquaxyz%2Faqua-app%2Factions%2Fruns%2F3186451445&commit=048eb3245d7d7e410673afe6b9b0e7b67c5c8c77&job=frontend&pr=2015&service=github-actions&slug=aquaxyz%2Faqua-app&name=&tag=&flags=&parent=
Content-Type: 'text/plain'
Content-Encoding: 'gzip'
X-Reduced-Redundancy: 'false'