codecov/codecov-action "failed to properly upload report"
codecov-action uploads coverage to Codecov. A transient network error, an upstream 5xx, or a missing token on private repos can fail the upload after tests pass.
What this error means
The codecov step fails with "failed to properly upload report" though tests and coverage generation succeeded.
['error'] There was an error running the uploader: Error uploading to ...
failed to properly upload report
##[error]Codecov: Failed to properly upload reportDiagnose it: is the job queued, or is the runner gone?
A job that never starts and a job whose runner disappeared mid-run look similar in the UI and have opposite causes. The first is a labelling or capacity problem, the second is the runner being killed, usually by memory pressure or a spot reclaim.
- name: Runner facts
run: |
echo "runner name: $RUNNER_NAME"
echo "os/arch: $RUNNER_OS/$RUNNER_ARCH"
nproc; free -h; df -h /
echo "labels this job asked for: ${{ toJSON(job) }}"Common causes
Transient upload failure
A momentary network error or Codecov 5xx interrupts the upload.
Missing token on private repo
Private repos require CODECOV_TOKEN; without it the upload is rejected.
How to fix it
Supply the token and tolerate transient flakes
- Set the token input to secrets.CODECOV_TOKEN for private repos.
- Set fail_ci_if_error thoughtfully so a transient flake does not always fail CI.
- Re-run for transient upload errors.
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.infoThe failures that are not your workflow
- Exit 137 is the kernel out-of-memory killer, not an application error. Check
free -habove against your peak usage. - Disk exhaustion presents as unrelated write errors deep in a build. GitHub-hosted runners ship roughly 14 GB of free space, which a Docker-heavy job can exhaust.
- A lost connection to the server on a self-hosted runner is usually the host being reclaimed or rebooted, not a network fault in your job.
- A job that starts and immediately fails with no step output normally failed during runner setup, before your workflow ran at all.
How to prevent it
- Provide CODECOV_TOKEN for private repositories.
- Latchkey managed runners auto-retry transient upload failures to coverage services, so an intermittent Codecov upload error usually clears on retry.