Skip to content
← Back to activity

Public problem

Codecov Error failed to properly upload in GitHub Actions

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Coverage uploads fail in GitHub Actions with "Error: failed to properly upload". The action pings https://codecov.io/upload/v4 and the upload never completes. This was widely reported when uploads were tokenless: the root cause was hitting the GitHub API rate limit when Codecov tried to locate the build via the GitHub Actions API, which made the upload fail cryptically.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

Create a Codecov token for the repo and pass it to the action so the upload does not depend on the unauthenticated GitHub API. Add CODECOV_TOKEN as a repository secret (Settings, then Secrets and variables, then Actions), then reference that secret in the workflow's token input for codecov/codecov-action@v4. Multiple reporters confirmed this fixed the upload failure. If you see a Codecov token not found error after upgrading to v4, double-check the secret is a repository secret and not just an environment variable.

Source: https://github.com/codecov/codecov-action/issues/598