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.
['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: Failed to properly upload reportCommon 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
- Use the latest
codecov/codecov-actionso it carries the current CLI with retry logic. - Re-run the job; a transient storage error usually clears on the next attempt.
- Keep
fail_ci_if_erroronly on branches where coverage upload is genuinely required.
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: trueConfirm 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.
- 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_errorfor required-gate branches.