codecov-action: Codecov responds with "Repository not found"

I am experiencing an inability to upload to codecov.

I was using v3 without a token, and I was getting the following rejection message:

[2024-10-23T05:33:29.815Z] ['info'] Detected GitHub Actions as the CI provider.
[2024-10-23T05:33:30.807Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.8.0&token=*******&branch=update-dev-infrastructure&build=11473685570&build_url=https%3A%2F%2Fgithub.com%2FSethMMorton%2Ffastnumbers%2Factions%2Fruns%2F11473685570&commit=ab3084282811cb6a02c5ed2ccd9296f0b4a78247&job=Tests&pr=&service=github-actions&slug=SethMMorton%2Ffastnumbers&name=&tag=&flags=&parent=
[2024-10-23T05:33:30.989Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 429 - {"message":"Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 1059s."}

[2024-10-23T05:33:30.989Z] ['info'] Codecov will exit with status code 0. If you are expecting a non-zero exit code, please pass in the `-Z` flag

I then registered a global upload token with Codecov and added that to my configuration, and now the message I get is:

[2024-10-24T02:33:28.906Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.8.0&token=*******&branch=update-dev-infrastructure&build=11491437313&build_url=https%3A%2F%2Fgithub.com%2FSethMMorton%2Ffastnumbers%2Factions%2Fruns%2F11491437313&commit=19c704f7175545bedb1b996e4a27dc53d8d3ae03&job=Tests&pr=&service=github-actions&slug=SethMMorton%2Ffastnumbers&name=&tag=&flags=&parent=
[2024-10-24T02:33:28.906Z] ['verbose'] Passed token was 36 characters long
[2024-10-24T02:33:28.906Z] ['verbose'] https://codecov.io/upload/v4?package=github-action-3.1.6-uploader-0.8.0&branch=update-dev-infrastructure&build=11491437313&build_url=https%3A%2F%2Fgithub.com%2FSethMMorton%2Ffastnumbers%2Factions%2Fruns%2F11491437313&commit=19c704f7175545bedb1b996e4a27dc53d8d3ae03&job=Tests&pr=&service=github-actions&slug=SethMMorton%2Ffastnumbers&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2024-10-24T02:33:29.260Z] ['error'] There was an error running the uploader: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 400 - {"message":"Repository not found"}
[2024-10-24T02:33:29.261Z] ['verbose'] The error stack is: Error: Error uploading to [https://codecov.io:](https://codecov.io/) Error: There was an error fetching the storage URL during POST: 400 - {"message":"Repository not found"}
    at main (/snapshot/repo/dist/src/index.js)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2024-10-24T02:33:29.261Z] ['verbose'] End of uploader: 1429 milliseconds
[2024-10-24T02:33:29.261Z] ['info'] Codecov will exit with status code 0. If you are expecting a non-zero exit code, please pass in the `-Z` flag

I get this same response whether or not I am using v3 or v4.

How can I solve this “Repository not found” error?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 43 (20 by maintainers)

Commits related to this issue

Most upvoted comments

I’m sorry, too late… We replaced our token with one without a final newline and it fixed it.

You can likely replicate the same by adding trailing vertical spaces

I found it’s working with repository token, but not with global token. (when omitting slug)

I think it’s bug when using global token.

So, switching to repository token is also the workaround.

@elalish 😅, yeah it’s a pretty terrible error message. I’m gonna work with the product team to hopefully get some better messaging that is actionable.

@eliatcodecov I responded on your PR, let me know and I can dig more into why this is happening for you

I’m hitting this same problem (3 out of 3 tries so far) - e.g. https://github.com/elalish/manifold/actions/runs/11753759913/job/32747207966?pr=1032

==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github -C f97e447c6ce7d26771a6a41[36](https://github.com/elalish/manifold/actions/runs/11753759913/job/32747207966?pr=1032#step:10:37)2d30605f6ed1e9a
info - 2024-11-09 06:12:30,715 -- ci service found: github-actions
info - 2024-11-09 06:12:31,379 -- Process Commit creating complete
error - 2024-11-09 06:12:31,[37](https://github.com/elalish/manifold/actions/runs/11753759913/job/32747207966?pr=1032#step:10:38)9 -- Commit creating failed: {"message":"Repository not found"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github -C f97e447c6ce7d26771a6a41362d30605f6ed1e9a
info - 2024-11-09 06:12:32,073 -- ci service found: github-actions
info - 2024-11-09 06:12:32,917 -- Process Report creating complete
error - 2024-11-09 06:12:32,917 -- Report creating failed: {"message":"Repository not found"}

I’m using v4 and I just set up an access token when I realized our codecov hadn’t been updated for months due to the access change. I’m not allowed to reopen apparently, but I can tag you as requested, @thomasrockhu-codecov.

@SethMMorton can you try using v4? We are not actively doing work on v3