# Commit sha does not match Circle build

**URL:** <https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266>\
**Category:** Support\
**Tags:** github\
**Created:** [April 12, 2023, 4:07pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266 "2023-04-12T16:07:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![hennevogel](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/hennevogel/32/2619_2.png) [@hennevogel](https://community.codecov.com/u/hennevogel)\
**Post date:** [April 12, 2023, 4:07pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/1 "2023-04-12T16:07:03Z")

</div>

## Before submitting a topic, please confirm the following

I have searched for similar issues before creating this topic.  
 I have verified that my repository is using the [Codecov GitHub app](https://github.com/apps/codecov), if using GitHub  
 I have [validated](https://docs.codecov.com/docs/codecov-yaml#validate-your-repository-yaml) my `codecov.yaml` configuration file.  
 I have filled out the below sections to the best of my ability.  
 I understand that the community boards are a free, best-effort tool. While we hope to have someone on the Codecov team resolve your problem quickly, this is not always possible.

### Description

Uploading for a public repo with the universal binary uploader faIls.

### CI/CD URL

Link to the CI/CD run:

[https://circleci.com/api/v1.1/project/github/openSUSE/open-build-service/124451/output/103/0?file=true&allocation-id=6436d65ff722fc0fc8ef2209-0-build%2F31C919F6](https://circleci.com/api/v1.1/project/github/openSUSE/open-build-service/124451/output/103/0?file=true&allocation-id=6436d65ff722fc0fc8ef2209-0-build%2F31C919F6)

### Codecov Output

```auto
#!/bin/bash -eo pipefail
cd src/api
curl -LOs https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -v -f coverage/coverage.xml

[2023-04-12T15:07:40.953Z] ['verbose'] Start of uploader: 1681312060953...
[2023-04-12T15:07:40.954Z] ['info'] 
     _____ _
    / ____ | | |
   | | _____ | | ______  _______
   | | / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |__/ (_| (_) \ V /
    \ _____\___ / \ __,_|\___ |\ ___\___ / \_/

  Codecov report uploader 0.4.1
[2023-04-12T15:07:40.959Z] ['info'] => Project root located at: /home/frontend/project
[2023-04-12T15:07:40.962Z] ['info'] -> No token specified or token is empty
[2023-04-12T15:07:40.962Z] ['verbose'] Start of network processing...
[2023-04-12T15:07:40.962Z] ['verbose'] Searching for files in /home/frontend/project
[2023-04-12T15:07:40.974Z] ['verbose'] coveragepy is not installed
[2023-04-12T15:07:40.974Z] ['info'] Searching for coverage files...
[2023-04-12T15:07:41.145Z] ['info'] Warning: Some files passed via the -f flag would normally be excluded from search.
[2023-04-12T15:07:41.145Z] ['info'] If Codecov encounters issues processing your reports, please review https://docs.codecov.com/docs/supported-report-formats
[2023-04-12T15:07:41.145Z] ['verbose'] Preparing to clean the following coverage paths: coverage/coverage.xml,src/api/coverage/coverage.xml
[2023-04-12T15:07:41.145Z] ['info'] => Found 1 possible coverage files:
  src/api/coverage/coverage.xml
[2023-04-12T15:07:41.146Z] ['verbose'] End of network processing
[2023-04-12T15:07:41.146Z] ['info'] Processing /home/frontend/project/src/api/coverage/coverage.xml...
[2023-04-12T15:07:41.175Z] ['info'] Detected CircleCI as the CI provider.
[2023-04-12T15:07:41.175Z] ['verbose'] -> Using the following env variables:
[2023-04-12T15:07:41.175Z] ['verbose'] CI: true
[2023-04-12T15:07:41.175Z] ['verbose'] CIRCLECI: true
[2023-04-12T15:07:41.175Z] ['verbose'] Using the following upload parameters:
[2023-04-12T15:07:41.175Z] ['verbose'] branch
[2023-04-12T15:07:41.175Z] ['verbose'] build
[2023-04-12T15:07:41.175Z] ['verbose'] buildURL
[2023-04-12T15:07:41.175Z] ['verbose'] commit
[2023-04-12T15:07:41.175Z] ['verbose'] job
[2023-04-12T15:07:41.175Z] ['verbose'] pr
[2023-04-12T15:07:41.175Z] ['verbose'] service
[2023-04-12T15:07:41.175Z] ['verbose'] slug
[2023-04-12T15:07:41.175Z] ['verbose'] name
[2023-04-12T15:07:41.175Z] ['verbose'] tag
[2023-04-12T15:07:41.175Z] ['verbose'] flags
[2023-04-12T15:07:41.175Z] ['verbose'] parent
[2023-04-12T15:07:41.176Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.4.1&token= ******* &branch=pull%2F14141&build=124441&build_url=https%3A%2F%2Fcircleci.com%2Fgh%2FopenSUSE%2Fopen-build-service%2F124441&commit=ea8d71ff3c8bd87fd985c91fb9aff693c1c0e4f1&job=0&pr=14141&service=circleci&slug=openSUSE%2Fopen-build-service&name=&tag=&flags=&parent=
[2023-04-12T15:07:41.176Z] ['verbose'] Passed token was 0 characters long
[2023-04-12T15:07:41.176Z] ['verbose'] https://codecov.io/upload/v4?package=uploader-0.4.1&branch=pull%2F14141&build=124441&build_url=https%3A%2F%2Fcircleci.com%2Fgh%2FopenSUSE%2Fopen-build-service%2F124441&commit=ea8d71ff3c8bd87fd985c91fb9aff693c1c0e4f1&job=0&pr=14141&service=circleci&slug=openSUSE%2Fopen-build-service&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
[2023-04-12T15:07:41.543Z] ['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='Commit sha does not match Circle build. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
[2023-04-12T15:07:41.543Z] ['verbose'] The error stack is: Error: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 404 - {'detail': ErrorDetail(string='Commit sha does not match Circle build. Please upload with the Codecov repository upload token to resolve issue.', code='not_found')}
    at main (/snapshot/repo/dist/src/index.js)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-04-12T15:07:41.544Z] ['verbose'] End of uploader: 591 milliseconds

CircleCI received exit code 0

```

### Expected Results

Uploading works.

### Actual Results

Uploading did not work.

### Additional Information

This stopped working round about 6 days ago as you can see on the [pulls overview](https://app.codecov.io/gh/openSUSE/open-build-service/pulls).

Uploading works with providing a `CODECOV_TOKEN` but we are using a fork based model which does not allow to safely set this up.

---

<div class="post-metadata">

**Author:** ![unlikelyzero](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/unlikelyzero/32/3012_2.png) [@unlikelyzero](https://community.codecov.com/u/unlikelyzero)\
**Post date:** [April 14, 2023, 8:44pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/2 "2023-04-14T20:44:08Z")

</div>

We are also seeing this exact same issue. We’re still using the npm package

---

<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:** [April 18, 2023, 6:50am UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/3 "2023-04-18T06:50:37Z")

</div>

@hennevogel as you mentioned, a solution is to use the CODECOV\_TOKEN.

Strange, I’ve seen this pop up before, but I haven’t had enough details to properly fix it.

1. How often does this happen?
2. Has it only been in the past 6 days? Does it go away?

Here’s an older [issue](https://github.com/codecov/codecov-bash/issues/134#issuecomment-685884729) that shows a possible solution, but it’s not ideal. I’d love to get to the bottom of this, unless you are looking for the quick fix.

---

<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:** [April 18, 2023, 6:51am UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/4 "2023-04-18T06:51:18Z")

</div>

@unlikelyzero I would see the above comment and also strongly encourage you to switch to the actual uploader. We are planning on deprecating and removing the npm package in the upcoming months.

---

<div class="post-metadata">

**Author:** ![hennevogel](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/hennevogel/32/2619_2.png) [@hennevogel](https://community.codecov.com/u/hennevogel)\
**Post date:** [April 18, 2023, 12:17pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/5 "2023-04-18T12:17:18Z")

</div>

hey @tom

> How often does this happen?

It still happens for every PR since [14117](https://app.codecov.io/gh/openSUSE/open-build-service/pull/14117) and now also on master since [6 days](https://app.codecov.io/gh/openSUSE/open-build-service/commit/2cfbbd4b9ebb849b723b1863c47beb1965919da4) ago.

> Has it only been in the past 6 days? Does it go away?

Nope, it’s still ongoing. See above.

---

<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:** [April 19, 2023, 1:11am UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/6 "2023-04-19T01:11:29Z")

</div>

@hennevogel looks like a bug, let me see if I can get the product team to take a look

---

<div class="post-metadata">

**Author:** ![Martchus](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/martchus/32/3029_2.png) [@Martchus](https://community.codecov.com/u/Martchus)\
**Post date:** [April 21, 2023, 3:08pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/7 "2023-04-21T15:08:53Z")

</div>

We see the same problem in our CI checks (see [action #128129: codecov checks missing in pull requests - openQA Project - openSUSE Project Management Tool](https://progress.opensuse.org/issues/128129#note-3)). It definitely worked before without setting `CODECOV_TOKEN`. The problem started a few days ago.

---

<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:** [April 21, 2023, 3:34pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/8 "2023-04-21T15:34:19Z")

</div>

@Martchus yeah, I see that it probably is affecting a lot of CircleCI tokenless users. I made a request to the product team for a fix, and I’l update here when it’s been deployed. Sorry about this!

---

<div class="post-metadata">

**Author:** ![willdurand](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/willdurand/32/3045_2.png) [@willdurand](https://community.codecov.com/u/willdurand)\
**Post date:** [May 9, 2023, 8:38am UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/9 "2023-05-09T08:38:52Z")

</div>

@tom is there any more information about this bug? It’s affecting most if not all our public repos at the moment.

---

<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:** [May 10, 2023, 6:00pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/10 "2023-05-10T18:00:13Z")

</div>

@willdurand apologies, an engineer is currently working on a fix for this.

---

<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:** [May 12, 2023, 5:14pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/11 "2023-05-12T17:14:24Z")

</div>

@hennevogel @Martchus @willdurand please try now, this should be resolved!

---

<div class="post-metadata">

**Author:** ![Martchus](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/martchus/32/3029_2.png) [@Martchus](https://community.codecov.com/u/Martchus)\
**Post date:** [May 12, 2023, 9:02pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/12 "2023-05-12T21:02:22Z")

</div>

Thanks, I’ll try it on Monday. May I ask - out of curiosity - what you have changed?

---

<div class="post-metadata">

**Author:** ![Martchus](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/martchus/32/3029_2.png) [@Martchus](https://community.codecov.com/u/Martchus)\
**Post date:** [May 15, 2023, 2:36pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/13 "2023-05-15T14:36:23Z")

</div>

It looks like the fix works, indeed (e.g. [Handle updated/closed PRs via webhook by Martchus · Pull Request #5133 · os-autoinst/openQA · GitHub](https://github.com/os-autoinst/openQA/pull/5133)).

---

<div class="post-metadata">

**Author:** ![hennevogel](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/hennevogel/32/2619_2.png) [@hennevogel](https://community.codecov.com/u/hennevogel)\
**Post date:** [May 15, 2023, 2:53pm UTC](https://community.codecov.com/t/commit-sha-does-not-match-circle-build/4266/14 "2023-05-15T14:53:52Z")

</div>

Yeah started to work again 3 days ago [Codecov](https://app.codecov.io/gh/openSUSE/open-build-service/pulls)

Thank you for the fix! 💐
