Skip to content
Latchkey

Codecov "Failed to properly upload report" in CI

The Codecov uploader found a report and tried to send it, but the upload step itself failed: a network drop, a 5xx from Codecov storage, or a rejected request. The report exists; the transfer did not complete.

What this error means

The Codecov step ends with "Failed to properly upload report" (older CLI) or "There was an error fetching the storage URL" / "Failed to upload" and the action exits non-zero.

Codecov
['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: Failed to properly upload report

Common causes

A transient network or storage failure

The uploader fetched the presigned storage URL but the PUT to that URL timed out or returned a 5xx, so the report never landed.

fail_ci_if_error turns a flaky upload into a job failure

With fail_ci_if_error: true, any upload hiccup fails the whole job instead of warning, which is correct for required gates but surfaces transient flakiness.

How to fix it

Pin a current uploader and let it retry

  1. Use the latest codecov/codecov-action so it carries the current CLI with retry logic.
  2. Re-run the job; a transient storage error usually clears on the next attempt.
  3. Keep fail_ci_if_error only on branches where coverage upload is genuinely required.
.github/workflows/ci.yml
- uses: codecov/codecov-action@v5
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    fail_ci_if_error: true

Confirm the report path so the right file uploads

Point the action at the exact coverage file your test step produced, so it is not silently uploading nothing or the wrong artifact.

.github/workflows/ci.yml
- uses: codecov/codecov-action@v5
  with:
    files: ./coverage.xml
    token: ${{ secrets.CODECOV_TOKEN }}

How to prevent it

  • Keep the Codecov action pinned to a recent major version.
  • Generate the coverage report before the upload step and name the file explicitly.
  • Reserve fail_ci_if_error for required-gate branches.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →