CircleCI orb fails to upload quite often


I’m seeing that the uploading of reports fails quite often on our project. Generating the reports works just fine, but when we run the codecov/upload step, we get failures. This causes some wonkiness in our reports because an entire section is missing.


Private repo




CircleCI Orb

Commit SHAs

We’re using version 1.1.0 of the orb. But this was happening on the previous release as well.

Codecov YAML

  range: 70..100
  round: down
  precision: 2

  - 'workspace/::'

Codecov Output

#!/bin/bash -eo pipefail
curl -s | bash -s -- \
  -f "packages/web/coverage/coverage-final.json" \
  -t "${CODECOV_TOKEN}" \
  -n "${CIRCLE_BUILD_NUM}" \
  -y ".codecov.yml" \
  -F "web" \
  -Z || echo 'Codecov upload failed'
Codecov upload failed
CircleCI received exit code 0

Steps to Reproduce

  1. Add orb to CircleCI config. Here’s our CircleCI config.yml (note: all of our packages use the flags option):
- codecov/upload:
    file: packages/web/coverage/coverage-final.json
    flags: web
  1. Wait for CircleCI to build
  2. Observe some uploads fail

Expected behavior: [What you expect to happen]

Not to fail.

Actual behavior: [What actually happens]


Flakiness? [Does this happen all the time or only sometimes?]

Only sometimes, hard to give a percentage… maybe 5-10% of the time.

Additional Information

It’s possible this is a timeout because this particular step took 2m9s whereas our other 6 uploads took 2s each and succeeded.

Thanks @joelpoloney, could you supply a commit SHA for this so I can dig in?

@joelpoloney, we had an incident earlier that has been resolved and might be why you were experiencing this issue. Would you be able to log out of, clear your cookies, and log back in? This should resolve your problem.

I am also experiencing upload failures when using CircleCI in a private GitHub repo. The codecov stage takes about 30mins and then it fails without publishing the report. Any idea how this can be fixed?
==> Gzipping contents
==> Uploading reports
query: branch=pull%2F33&commit=83559ae44b08bb506b158bd7cd90f6f38b1d2278&build=89&…
-> Pinging Codecov
-> Uploading
X> Failed to upload
-> Sleeping for 30s and trying again…
-> Pinging Codecov
-> Uploading
X> Failed to upload
-> 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

Hi @emdob, what uploader are you using and what version?

@tom This issue isn’t with the Codecov website or cookies or anything like that. It’s specifically when the CircleCI orb tries uploading and after 2 minutes it fails. This is still consistently happening a few times a week for us.

Here’s a git commit hash for one that failed 2/7 times from this morning: 8df1469538963bddc28210cdbb63bfee5c88578a.

This is what we see:

@joelpoloney, is there no other output on that failed bash upload? We typically expect to at least see the bash script running.

Nope that’s all there is. Our CircleCI config.yml has steps that look like:

      - codecov/upload:
          file: packages/notifications/coverage/coverage-final.json
          flags: notifications

and this is all we see :man_shrugging:We’re going to try moving off the orb and writing our own script that wraps the codecov npm commands and will see if that’s any better for us.

@joelpoloney, before you do that, would you be open to trying the bash script? I’d at least like to see more error logs on why this is happening, and I think directly using the script should give us some output.