# Github Actions POST upload 404: requires Codecov repository upload token

**URL:** <https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771>\
**Category:** Support\
**Created:** [July 26, 2022, 6:59am UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771 "2022-07-26T06:59:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmoayyed](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/mmoayyed/32/544_2.png) [@mmoayyed](https://community.codecov.com/u/mmoayyed)\
**Post date:** [July 26, 2022, 6:59am UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/1 "2022-07-26T06:59:32Z")

</div>

### Description

Uploads from public repository on Github using Github Actions shows:

```auto
[2022-07-25T18:41:14.578Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

```

Seems to be a random failure. Other uploads for other jobs work OK.

### CI/CD URL

[https://github.com/apereo/cas/runs/7505867350?check\_suite\_focus=true](https://github.com/apereo/cas/runs/7505867350?check_suite_focus=true)

and

[https://github.com/apereo/cas/blob/master/.github/workflows/test-ubuntu.yml#L159](https://github.com/apereo/cas/blob/master/.github/workflows/test-ubuntu.yml#L159)

### Codecov Output

```auto
Run codecov/codecov-action@v3
  with:
    files: ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
    flags: mail
    name: mail
    verbose: false
  env:
    JAVA_OPTS: -Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server
    GRADLE_OPTS: -Xms512m -Xmx6048m -Xss128m -XX:ReservedCodeCacheSize=512m -server
    TERM: xterm-256color
    GRADLE_BUILDCACHE_USER: ci
    GRADLE_BUILDCACHE_PSW: ***
    CODACY_PROJECT_TOKEN: ***
    SONARCLOUD_TOKEN: ***
    GITHUB_TOKEN: ***
    JDK_CURRENT: 11
    RETRY_MINUTES: 180
    CATEGORY_REGEX: .*
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/11.0.15-10/x64
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (432553f03714a83ab5cac78be2e7fe6a6050767f78f77e9c7a84bdb1c34a0bd3 codecov)
==> Running version latest
==> Running version v0.2.4
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n mail -Q github-action-3.1.0 -f ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml -F mail
[2022-07-25T18:41:13.025Z] ['info'] 

     _____ _
    / ____ | | |
   | | _____ | | ______  _______
   | | / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |__/ (_| (_) \ V /
    \ _____\___ / \ __,_|\___ |\ ___\___ / \_/

  Codecov report uploader 0.2.4
[2022-07-25T18:41:13.041Z] ['info'] => Project root located at: /home/runner/work/cas/cas
[2022-07-25T18:41:13.046Z] ['info'] -> No token specified or token is empty
[2022-07-25T18:41:13.072Z] ['info'] Searching for coverage files...
[2022-07-25T18:41:14.093Z] ['info'] => Found 1 possible coverage files:
  ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
[2022-07-25T18:41:14.093Z] ['info'] Processing ./build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml...
[2022-07-25T18:41:14.289Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-07-25T18:41:14.291Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.4&token= ******* &branch=master&build=2733897624&build_url=https%3A%2F%2Fgithub.com%2Fapereo%2Fcas%2Factions%2Fruns%2F2733897624&commit=dd9eace60d78cf737ef0c3f28facfcd41a096f6d&job=Tests+-+Ubuntu&pr=&service=github-actions&slug=apereo%2Fcas&name=mail&tag=&flags=mail&parent=
[2022-07-25T18:41:14.578Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

```

### Expected Results

Upload should successfully pass. Do we need to specify upload tokens?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [July 26, 2022, 9:40pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/2 "2022-07-26T21:40:06Z")

</div>

@mmoayyed strange… you shouldn’t have to. I see that you added in the token. I’m pretty sure the issue you ran into is a result of [this](https://status.codecov.com/incidents/33j08wzlmy28).

---

<div class="post-metadata">

**Author:** ![mmoayyed](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/mmoayyed/32/544_2.png) [@mmoayyed](https://community.codecov.com/u/mmoayyed)\
**Post date:** [July 27, 2022, 3:41pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/3 "2022-07-27T15:41:45Z")

</div>

Ah I see. I was thrown off by the error message. Thanks much! I suppose I could remove the token then?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [August 15, 2022, 2:26am UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/4 "2022-08-15T02:26:36Z")

</div>

@mmoayyed yes it should be safe to remove with public projects using GitHub Actions

---

<div class="post-metadata">

**Author:** ![unional](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/unional/32/2422_2.png) [@unional](https://community.codecov.com/u/unional)\
**Post date:** [October 27, 2022, 1:59am UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/5 "2022-10-27T01:59:47Z")

</div>

[2022-10-27T00:48:13.867Z] [‘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: 404 - {‘detail’: ErrorDetail(string=‘Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.’, code=‘not\_found’)}

Just happened in the past hour.

---

<div class="post-metadata">

**Author:** ![unional](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/unional/32/2422_2.png) [@unional](https://community.codecov.com/u/unional)\
**Post date:** [October 27, 2022, 6:50pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/6 "2022-10-27T18:50:40Z")

</div>

```auto
[2022-10-27T17:57:05.146Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.1-uploader-0.3.2&token= ******* &branch=up&build=3339732148&build_url=https%3A%2F%2Fgithub.com%2Funional%2Fsearch-packages%2Factions%2Fruns%2F3339732148&commit=2a9eb2fab9f9888b645597c0b518bed47d12a5df&job=pull-request&pr=44&service=github-actions&slug=unional%2Fsearch-packages&name=&tag=&flags=&parent=
[2022-10-27T17:57:10.417Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Unable to locate build via Github Actions API. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}

```

> <https://github.com/unional/search-packages/actions/runs/3339732148/jobs/5529031407>

Another failure. It is very frequent.

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [October 31, 2022, 9:35pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/7 "2022-10-31T21:35:29Z")

</div>

@unional thanks for letting us know, we are working on a longer term fix for this issue.

---

<div class="post-metadata">

**Author:** ![briantist](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/briantist/32/1606_2.png) [@briantist](https://community.codecov.com/u/briantist)\
**Post date:** [November 1, 2022, 11:06pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/8 "2022-11-01T23:06:30Z")

</div>

I am also seeing this issue…  
[https://github.com/ansible-collections/community.hashi\_vault/actions/runs/3373349479/jobs/5598109920#step:5:96](https://github.com/ansible-collections/community.hashi_vault/actions/runs/3373349479/jobs/5598109920#step:5:96)

@tom is there anywhere we can track the long term dix for this issue?  
Is there a short term fix for the issue?

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [November 10, 2022, 9:23pm UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/9 "2022-11-10T21:23:34Z")

</div>

@unional @briantist @mmoayyed yes, I’m tracking the issue [here](https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954)

---

<div class="post-metadata">

**Author:** ![lloricode](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/lloricode/32/3049_2.png) [@lloricode](https://community.codecov.com/u/lloricode)\
**Post date:** [May 12, 2023, 7:40am UTC](https://community.codecov.com/t/github-actions-post-upload-404-requires-codecov-repository-upload-token/3771/10 "2023-05-12T07:40:52Z")

</div>

this is similar as mine using private repository
