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

unable to upload coverage report #43

Closed
mosesliao opened this issue Dec 9, 2019 · 29 comments
Closed

unable to upload coverage report #43

mosesliao opened this issue Dec 9, 2019 · 29 comments

Comments

@mosesliao
Copy link

Hi, I am unable to upload the coverage report into codecov. Below is the image. Could it be possible that github block internet access?

Screenshot 2019-12-09 at 10 13 42 AM

@eyal0
Copy link

eyal0 commented Dec 11, 2019

Is this from a PR? Is the source of the PR the same repo as the target or is it a fork?

@mihaiblaga89
Copy link

mihaiblaga89 commented Dec 11, 2019

I have the exact same issue. In my case it's no PR, just a push.

Edit: just updated the action from v1.0.3 to v1.0.5 and it works.

@ibrahim0814
Copy link
Contributor

ibrahim0814 commented Dec 11, 2019

Hi @liaogz82! Thank you for bringing this up. Just want to make sure that there weren't any obvious errors in your setup:

  • Are you using the @v1 major tag or the latest @v1.0.5 tag?
  • Have you provided a token?

Let me know if you still encounter any problems after addressing those two things so we can punch in a support ticket

@mosesliao
Copy link
Author

@ibrahim0814

  1. it is @v1
  2. yes I did.

Let me try the @v1.0.5

@ibrahim0814
Copy link
Contributor

Any luck @liaogz82? If not, please submit a support ticket here and we'll help you to get up and running as quickly as possible: https://codecov.io/support

@CasperWA
Copy link

CasperWA commented Dec 12, 2019

This is still a problem for v1.0.5 as tested in two different repositories. Both yield the error:

HTTP 400
Please provide the repository token to upload reports via `-t :repository-token`

This is from the correct repo-owner and with correctly set-up secrets token.

@CasperWA
Copy link

This is still a problem for v1.0.5 as tested in two different repositories. Both yield the error:

HTTP 400
Please provide the repository token to upload reports via `-t :repository-token`

This is from the correct repo-owner and with correctly set-up secrets token.

But maybe this is indeed different from the original issue raised here? I will open another issue.

@henrythor
Copy link

henrythor commented Dec 13, 2019

This is common. Codecov's webservices are terrible. This happens regularly for us:

image

What's happening is that uploading fails so the action sleeps and tries again and again.

@ibrahim0814
Copy link
Contributor

Hi all, we apologize for the timeouts and delays. This is a problem we've identified at Codecov and are actively trying to fix.

@ADmad
Copy link

ADmad commented Dec 20, 2019

@CasperWA Is your build being triggered for a pull request from a fork? If so that error is expected since GH doesn't make secrets available to runners in that particular case.

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

Here's the related discussion https://github.community/t5/GitHub-Actions/Make-secrets-available-to-builds-of-forks/td-p/30678
The issue still exists even though that thread is marked as "Solved"

@CasperWA
Copy link

@CasperWA Is your build being triggered for a pull request from a fork? If so that error is expected since GH doesn't make secrets available to runners in that particular case.

It is. I also commented on it in the other issue #44 I opened.

...
The issue still exists even though that thread is marked as "Solved"

This makes sense for me from a security point-of-view, since if one was able to access secrets from another user, one could retrieve them. Think for example of a case, where I create an Action that prints all secrets, or tries to go through commonly names secrets. I then make a PR against any repository and it would then provide me with the secrets of the external owner's repository - not good.

In the context of codecov, the solution would be what is done for Travis and other CIs, namely to have token-less, but still "safe", access through the codecov API for uploading coverage reports, but through GitHub Actions.

@unRob
Copy link

unRob commented Jan 7, 2020

Seeing the same issues (using v1.0.5) on the check runs of our repo. It worked maybe once or twice (can't really tell) on a feature branch yesterday to try out your service. Output looks like:

==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=d0514196e990f7ab18564556f4d50729c5c0cd13&build=&build_url=&name=&tag=&slug=blinkhealth%2Fconfig-yourself-python&service=github-actions&flags=2.7&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=d0514196e990f7ab18564556f4d50729c5c0cd13&build=&build_url=&name=&tag=&slug=blinkhealth%2Fconfig-yourself-python&service=github-actions&flags=2.7&pr=&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20191211-b8db533&token=secret&branch=master&commit=d0514196e990f7ab18564556f4d50729c5c0cd13&build=&build_url=&name=&tag=&slug=blinkhealth%2Fconfig-yourself-python&service=github-actions&flags=2.7&pr=&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...

Happens on all matrix jobs for a couple of minutes before it gives up.

Deltik added a commit to e107inc/e107 that referenced this issue Jan 12, 2020
Apparently, there's no easy way to submit coverage reports from GitHub pull request builds
without exposing this reporter ID. Coverage diff reports should now come in from pull
request builds after this commit. The expectation is that Code Climate will comment on the
pull requests and mark the build as failed or succeeded based on the coverage diff.

This commit also disables sending code coverage reports to Codecov, which has been broken
for a while now: codecov/codecov-action#43
yuizho added a commit to yuizho/db-raccoon that referenced this issue Feb 15, 2020
@FabioLuporini
Copy link

I'm also experiencing the same issue, more or less randomly. Using v1.0.5

@armano2
Copy link
Contributor

armano2 commented Feb 18, 2020

job= seems to not be filled

@nschloe
Copy link

nschloe commented Feb 18, 2020

Same issue here; a bunch of sleeps and eventually

    HTTP 400
flags must match pattern ^[\w\,]+$

because of &pr=&job=.

@michaelarnauts
Copy link

Using codecov/codecov-action@v1.0.6 fixes this, but shouldn't codecov/codecov-action@v1 just use the latest version in the 1.x series?

@mosesliao
Copy link
Author

Ok It is working on my side. Thanks

@ivelin
Copy link

ivelin commented Apr 21, 2020

I'm still experiencing this issue even with codecov/codecov-action@v1.0.6 and codecov/codecov-action@master

Update: On second try, it did work with codecov/codecov-action@master

Another update: Failing again.

Here is the public repo for reference: https://github.com/ambianic/ambianic-ui/runs/604157465

https://codecov.io/upload/v4?package=bash-tbd&token=secret&branch=master&commit=031fdea3ec4b714c9380d4d66b990cd140e1aa0e&build=83514478&build_url=http%3A%2F%2Fgithub.com%2Fambianic%2Fambianic-ui%2Factions%2Fruns%2F83514478&name=codecov-umbrella&tag=&slug=ambianic%2Fambianic-ui&service=github-actions&flags=pwa-tests&pr=&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    HTTP 400
flags must match pattern ^[\w\,]+$

@dhrn
Copy link

dhrn commented May 4, 2020

+1

@CraigWoolgar
Copy link

Still experiencing this error as well. It's artificially doubling our build times as we wait for the Codecov upload to complete.

@ivelin
Copy link

ivelin commented May 15, 2020

This error is still present after updating to v1.0.7. Any comments from the codecov team?

  Code Coverage Report4m 14s
flags must match pattern ^[\w\,]+$
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-tbd&token=secret&branch=dev&commit=ada29dc728c25da75ed727bb607dd670fc44ee14&build=106164552&build_url=http%3A%2F%2Fgithub.com%2Fambianic%2Fambianic-ui%2Factions%2Fruns%2F106164552&name=pwa-e2e-test-coverage&tag=&slug=ambianic%2Fambianic-ui&service=github-actions&flags=pwa-e2e-cypress-tests&pr=367&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-tbd&token=secret&branch=dev&commit=ada29dc728c25da75ed727bb607dd670fc44ee14&build=106164552&build_url=http%3A%2F%2Fgithub.com%2Fambianic%2Fambianic-ui%2Factions%2Fruns%2F106164552&name=pwa-e2e-test-coverage&tag=&slug=ambianic%2Fambianic-ui&service=github-actions&flags=pwa-e2e-cypress-tests&pr=367&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-tbd&token=secret&branch=dev&commit=ada29dc728c25da75ed727bb607dd670fc44ee14&build=106164552&build_url=http%3A%2F%2Fgithub.com%2Fambianic%2Fambianic-ui%2Factions%2Fruns%2F106164552&name=pwa-e2e-test-coverage&tag=&slug=ambianic%2Fambianic-ui&service=github-actions&flags=pwa-e2e-cypress-tests&pr=367&job=
    -> Uploading
    X> Failed to upload
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    HTTP 400
flags must match pattern ^[\w\,]+$

The codecov portion of the action script looks like this:

 - name: Code Coverage Report
      uses: codecov/codecov-action@v1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./coverage/coverage-final.json # optional
        flags: pwa-e2e-cypress-tests # optional
        name: pwa-e2e-test-coverage # optional
        fail_ci_if_error: true # optional (default = false)     

@wayne-li2
Copy link

Sadly this is also affecting me, although I am on @v1.

    - name: Upload code coverage.
      uses: codecov/codecov-action@v1
      with:
        token: ${{secrets.CODECOV_TOKEN}}
        file: ./coverage/lcov.info
        fail_ci_if_error: true
==> Reading reports
    + ./coverage/lcov.info bytes=652
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=review-widget&commit=6d15e6299461861cd36438949d9402f66986d275&build=127945694&build_url=http%3A%2F%2Fgithub.com%2Fwayne-li2%2Ffilm_tracker%2Factions%2Fruns%2F127945694&name=&tag=&slug=wayne-li2%2Ffilm_tracker&service=github-actions&flags=&pr=&job=
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=review-widget&commit=6d15e6299461861cd36438949d9402f66986d275&build=127945694&build_url=http%3A%2F%2Fgithub.com%2Fwayne-li2%2Ffilm_tracker%2Factions%2Fruns%2F127945694&name=&tag=&slug=wayne-li2%2Ffilm_tracker&service=github-actions&flags=&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=review-widget&commit=6d15e6299461861cd36438949d9402f66986d275&build=127945694&build_url=http%3A%2F%2Fgithub.com%2Fwayne-li2%2Ffilm_tracker%2Factions%2Fruns%2F127945694&name=&tag=&slug=wayne-li2%2Ffilm_tracker&service=github-actions&flags=&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=review-widget&commit=6d15e6299461861cd36438949d9402f66986d275&build=127945694&build_url=http%3A%2F%2Fgithub.com%2Fwayne-li2%2Ffilm_tracker%2Factions%2Fruns%2F127945694&name=&tag=&slug=wayne-li2%2Ffilm_tracker&service=github-actions&flags=&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=review-widget&commit=6d15e6299461861cd36438949d9402f66986d275&build=127945694&build_url=http%3A%2F%2Fgithub.com%2Fwayne-li2%2Ffilm_tracker%2Factions%2Fruns%2F127945694&name=&tag=&slug=wayne-li2%2Ffilm_tracker&service=github-actions&flags=&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    X> Failed to upload coverage reports
##[error]Codecov failed with the following error: The process 'bash' failed with exit code 1

@kuromukira
Copy link

Encountered this just now. It's consuming GitHub actions minutes with all the failed coverage uploads. Was using v1.0.5 and I tried switching over to using v1.0.7. The same issue.

https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=feature%2Fdashboard-service&commit=6d52c829dce196c19e72d3ab37903561b3e4b5f3&build=128305863&build_url=http%3A%2F%2Fgithub.com%2Fkuromukira%2Fserve.it%2Factions%2Fruns%2F128305863&name=&tag=&slug=kuromukira%2Fserve.it&service=github-actions&flags=unitetests&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    X> Failed to upload coverage reports
##[error]Codecov failed with the following error: The process '/bin/bash' failed with exit code 1

Any updates on this?

@ivelin
Copy link

ivelin commented Jun 8, 2020

In our case it turned out to be the choice of name for the flag parameter of codecov section in the github action. The name we used had a - in it, which codecov did not like. We removed the flag parameter as it wasn't that important.

Although the codecov error message in the github action log was not helpful, Tom provided a good clue on the codecov forum. Hope it helps others.

@kuromukira
Copy link

Encountered this just now. It's consuming GitHub actions minutes with all the failed coverage uploads. Was using v1.0.5 and I tried switching over to using v1.0.7. The same issue.

https://codecov.io/upload/v4?package=bash-20200602-f809a24&token=secret&branch=feature%2Fdashboard-service&commit=6d52c829dce196c19e72d3ab37903561b3e4b5f3&build=128305863&build_url=http%3A%2F%2Fgithub.com%2Fkuromukira%2Fserve.it%2Factions%2Fruns%2F128305863&name=&tag=&slug=kuromukira%2Fserve.it&service=github-actions&flags=unitetests&pr=&job=
    -> Sleeping for 30s and trying again...
    -> Uploading to Codecov
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    -> Sleeping for 30s and trying again...
    X> Failed to upload coverage reports
##[error]Codecov failed with the following error: The process '/bin/bash' failed with exit code 1

Any updates on this?

Tried going back to v1.0.5, the issue is still there. All we get now are failed uploads to CodeCov.

@danielmklein
Copy link

We are seeing this seemingly randomly as well. We are running our build on GitHub Actions but not using the Codecov action directly -- rather, we call the codecov executable directly.

This is incredibly difficult to diagnose, as it could be a networking issue with GitHub Actions, an API reliability issue with Codecov, or any number of other things. Anecdotally, we have seen that these tend to cluster in time (for example we just saw two of them back-to-back), which leads me to suspect it's a Codecov API reliability issue, but this is entirely conjecture.

Any suggestions or ideas from the Codecov team would be super appreciated.

@heldersepu
Copy link

Getting same/similar issue on Appveyor:

$env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
bash codecov.sh -f "coverage.xml" -t 4526d3eb-e1b0-4046-99cd-5f70a2ce8762
  _____          _
 / ____|        | |
| |     ___   __| | ___  ___ _____   __
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| |  __/ (_| (_) \ V /
 \_____\___/ \__,_|\___|\___\___/ \_/
                              Bash-20200728-9fb7d93
==> Appveyor CI detected.
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + coverage.xml bytes=516
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    -> No adjustments found
==> Gzipping contents
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=b2f74bcc83d1dd7b9e634f0884b953875afb167e&build=wjyd5rm4f90nq8ky&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fheldersepu%2FSwagger-Net%2Fbuilds%2F34821946%2Fjob%2Fwjyd5rm4f90nq8ky&name=&tag=&slug=heldersepu%2FSwagger-Net&service=appveyor&flags=&pr=&job=heldersepu%2Fswashbuckle%2F1.0.514&cmd_args=f,t
->  Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200728-9fb7d93&token=secret&branch=master&commit=b2f74bcc83d1dd7b9e634f0884b953875afb167e&build=wjyd5rm4f90nq8ky&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fheldersepu%2FSwagger-Net%2Fbuilds%2F34821946%2Fjob%2Fwjyd5rm4f90nq8ky&name=&tag=&slug=heldersepu%2FSwagger-Net&service=appveyor&flags=&pr=&job=heldersepu%2Fswashbuckle%2F1.0.514&cmd_args=f,t
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-08-24/277C7475171412A5DBB39788291EB21E/b2f74bcc83d1dd7b9e634f0884b953875afb167e/efe4de71-0a3d-4f5b-957b-1d11c7797809.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20200824%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20200824T145444Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=84e107d1a24e8ded2d2b5d02deaa15b8fc15aa0b76960ce3c89ac47078f7804a
bash :   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
At line:3 char:1
+ bash codecov.sh -f "coverage.xml" -t 4526d3eb-e1b0-4046-99cd-5f70a2ce ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (  % Total    % ...  Time  Current:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
 

https://ci.appveyor.com/project/heldersepu/swashbuckle/builds/34821946

@thomasrockhu
Copy link
Contributor

Unfortunately, there are a lot of different issues that are happening in this thread making difficult for us to triage and fix. If you are seeing this, please make a ticket in our community boards.

@heldersepu
Copy link

@thomasrockhu
All the comments here are around the same endpoint https://codecov.io/upload/v4 ...

But here is a ticket in the community board:
https://community.codecov.io/t/unable-to-upload-coverage-report/1904

sadielbartholomew added a commit to sadielbartholomew/cfdm that referenced this issue Sep 21, 2020
* path to coverage XML was incorrect
* latest @1.X version must be specified (is not taken by default),
  see: codecov/codecov-action#43
sighingnow added a commit to alibaba/GraphScope that referenced this issue Jun 8, 2021
See also: codecov/codecov-action#258 and codecov/codecov-action#43.

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
vgvassilev added a commit to vgvassilev/clad that referenced this issue Jun 8, 2021
…ge info."

This reverts commit 8fc2352.

It seems there is an issue codecov/codecov-action#43 and we should wait to see
if it will be resolved. The same setup worked a day ago...
parth-07 pushed a commit to parth-07/clad that referenced this issue Jun 10, 2021
…ge info."

This reverts commit 8fc2352.

It seems there is an issue codecov/codecov-action#43 and we should wait to see
if it will be resolved. The same setup worked a day ago...
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