Commit sha does not match Circle build

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, if using GitHub
I have validated 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

Codecov Output

#!/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.

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

1 Like

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

@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 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.

@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.

hey @tom

How often does this happen?

It still happens for every PR since 14117 and now also on master since 6 days ago.

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

Nope, it’s still ongoing. See above.

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

1 Like

We see the same problem in our CI checks (see action #128129: codecov checks missing in pull requests - openQA Project - openSUSE Project Management Tool). It definitely worked before without setting CODECOV_TOKEN. The problem started a few days ago.

@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!

1 Like

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

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

1 Like

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

1 Like

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

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

1 Like

Yeah started to work again 3 days ago Codecov

Thank you for the fix! :bouquet:

1 Like