Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: failed to properly upload #598

Closed
iwahbe opened this issue Dec 9, 2021 · 63 comments
Closed

Error: failed to properly upload #598

iwahbe opened this issue Dec 9, 2021 · 63 comments

Comments

@iwahbe
Copy link

iwahbe commented Dec 9, 2021

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 #595. Any help would be appreciated.

@clementchadebec
Copy link

Hi,

I just got the same issue. Try regenerating a new secret token and change it in your settings > secrets.

Hope this helps.

@emiliza
Copy link

emiliza commented Dec 15, 2021

@clementchadebec our repo is public, and we don't have a secret configured

@aadibajpai
Copy link

I'm getting a similar thing to #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

@naisanzaa
Copy link

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

@jaybxyz
Copy link

jaybxyz commented Feb 4, 2022

Anyone has solved the issue? We are getting the same error. Our repository is also public. See this.

@jaybxyz
Copy link

jaybxyz commented Feb 4, 2022

I resolved the issue by changing the report extension to xml. I used to use coverage.out file.

@rafaelcalpena
Copy link

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"

@arunanshub
Copy link

Had to rerun the workflow. It's up and running. Is it a Heisenbug?

@C0ZEN
Copy link

C0ZEN commented Feb 5, 2022

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!

sweishen added a commit to fkie-cad/dewolf-logic that referenced this issue Feb 7, 2022
@m-vo
Copy link

m-vo commented Feb 8, 2022

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.

@MetRonnie
Copy link

MetRonnie commented Feb 11, 2022

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.

@arunanshub
Copy link

Using with.token parameter seems to fix the problem.

brunolange added a commit to brunolange/artifax that referenced this issue Feb 19, 2022
There seems to be an issue with the >v0.1.15
src: codecov/codecov-action/issues/598
@nickwest
Copy link

nickwest commented Mar 7, 2022

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 .

@cosmopool
Copy link

cosmopool commented Mar 7, 2022

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.

@BlueHotDog
Copy link

I'm having the same issue.
Are the code-cove folks on this? what's the status?
Some times the server returns 404 :(

@naisanzaa
Copy link

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.

@imgarylai
Copy link

Using with.token parameter seems to fix the problem.

Would you mind giving a detailed example?

5j9 added a commit to 5j9/wikitextparser that referenced this issue Apr 11, 2022
staticintlucas added a commit to staticintlucas/keyset-rs that referenced this issue Aug 21, 2023
caendesilva added a commit to hydephp/develop that referenced this issue Apr 12, 2024
a13xp0p0v added a commit to a13xp0p0v/kernel-hardening-checker that referenced this issue Apr 17, 2024
Trying to fix the error
```
Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255
```
codecov/codecov-action#598
a13xp0p0v added a commit to a13xp0p0v/kernel-hardening-checker that referenced this issue Apr 17, 2024
Again, trying to fix the error
```
Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255
```
codecov/codecov-action#598
@RemDelaporteMathurin
Copy link

I started running into this error again and moving to codecov-action@v4 fixed it! 🎉

rdleal added a commit to rdleal/intervalst that referenced this issue Apr 27, 2024
CodeCov upload has been consistently failing when trying to upload
coverage for a PR from a fork. This change updates CodeCov to v4 and
sets the `CODECOV_TOKEN` env var in an attempt to fix this issue.

See codecov/codecov-action#598
rdleal added a commit to rdleal/intervalst that referenced this issue Apr 27, 2024
CodeCov upload has been consistently failing when trying to upload
coverage for a PR from a fork. This change updates CodeCov to v4 and
sets the `CODECOV_TOKEN` env var in an attempt to fix this issue.

See codecov/codecov-action#598
fredcarle added a commit to sourcenetwork/defradb that referenced this issue Jun 3, 2024
## Relevant issue(s)

Resolves #2668 

## Description
I noticed that someone on the codecov repo mentioned that v4 fixed their
issue
codecov/codecov-action#598 (comment).
Trying it :)
lrq3000 added a commit to lrq3000/pyFileFixity that referenced this issue Jun 30, 2024
@lrq3000
Copy link

lrq3000 commented Jun 30, 2024

I started running again into this issue, and had to update to codecov-action@v4 as @RemDelaporteMathurin suggested.

If after the update you still get the following error:

Error: Codecov token not found. Please provide Codecov token with -t flag.

This is maybe because like me you defined the CODECOV_TOKEN as an environment variable instead of a repository secret. Go into https://github.com/your_org_or_username/your_repo/settings/secrets/actions and add CODECOV_TOKEN as a secret in the lower pane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests