Report link is broken & 'Unable to find commit in GitHub' in CodeCov dashboard


When uploading either locally or via CI (CircleCI), logs indicate the codecov report is successfully uploaded with a link to view, but link returns a 422 error. On the codecov dashboard, I’m also seeing the ‘Unable to find commit in GitHub’ message for that particular commit. Tapping on any of the links in the dashboard also returns 400 errors.


Private repo

Hi @cl2205

Sounds like a permissions error. Can you share a commit SHA so I can take a look in the logs?

@drazisil sure! Here is the commit SHA: 8821dcc4447bf5e9dbe04337eb71907902315a97

Yep, no access. You can set a Team bot, but we highly recommend using the GitHub app. You can find details on both here

Thanks @drazisil! I had initially requested and gotten Codecov access to my organization with private repos when I signed up for my Codecov account. Hadn’t installed the Github app though, which looks to also require access to my organization.

So I went ahead and installed the Github app as you suggested, requested and was granted organization access, and activated the specific repository i’m looking to cover, and I now see a new tab in the dashboard for that specific repo. But I’m not seeing my branch and recent commits or coverage report showing up there. The coverage report links from my CI logs are also still broken and returning 422 errors.

The branch with the ‘Unable to find commit in Github’ message I was seeing earlier still appears in a different tab in the Codecov dashboard under the same organization - so at the org level but not specific repo-level.

Any idea what could be happening now?

Also, i noticed a message about upgrading in order to add private repos: ‘Create a subscription to add Private Repositories. [Click here to upgrade your plan].’ but was under the impression that the Intro Plan covered up to 5 users and unlimited private or public repos. Wasn’t sure if that has anything to do with the restrictions I’m seeing above?

Due to the lack of access, there’s won’t really be any processed prior reports. If you are still seeing issues with new uploads, can I get a new SHA please?

Here’s a new one: cfb8ce52067b53bb8c2a56eb8447d455aa26d74b

It looks like yesterday is was still cranky, but when you uploaded again today at Feb 28, 2020 at 16:54:11.804 UTC all went though. Are you still getting the error?

@drazisil yes, it worked when i tried uploading the coverage report locally from the repo on my machine via bash today (which is the commit you saw): bash <(curl -s -t token

The uploading step is still not working via CI though (we use CircleCI) and what I’m troubleshooting now. The latest commit I pushed up that triggered the CI isn’t being shown on Codecov again. Even though CI logs indicated the upload was successfully and generates a report link, that report is still broken:

> @ report-coverage /home/circleci/shinetext/************
> nyc report --reporter=text-lcov > coverage.lcov && ./node_modules/.bin/codecov

  _____          _  
 / ____|        | |  
| |     ___   __| | ___  ___ _____   __  
| |    / _ \ / _` |/ _ \/ __/ _ \ \ / /  
| |___| (_) | (_| |  __/ (_| (_) \ V /  
 \_____\___/ \__,_|\___|\___\___/ \_/  
==> Detecting CI Provider
    Circle CI Detected
==> Configuration: 
{ commit: '8821dcc4447bf5e9dbe04337eb71907902315a97',
  branch: 'codecov',
  package: 'node-v3.6.5' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
    Failed to run gcov command.
==> Scanning for reports
    + /home/circleci/shinetext/************/coverage.lcov
==> Uploading reports
    View report at:

For the CI, I’m not using the bash uploader to upload though and am using the codecov-node package instead. I can verify the coverage.lcov report generation works but not the upload with codecov-node package. I’ve already added the Repository Upload Token as an environment variable to the repo in CircleCI and aren’t seeing any logs about missing the token in the logs so I assume access permissions isn’t the issue?

This commit doesn’t seem to even exist:

I wonder if codecov-node is somehow grabbing the wrong SHAs. Can you try the bash uploader?

Switched to the bash uploader and running into the same issue. It looks like the path to the commit isn’t right. They should be located at the repo -> PR level like so:

My circle config correctly specifies the working_directory at a the repo-level though (~/shinetext/glow-backend). Am I missing something else in my circle config?
#!/bin/bash --login
pwd && npm run report-coverage && ls && bash <(curl -s

> @ report-coverage /home/circleci/shinetext/************
> nyc report --reporter=text-lcov > coverage.lcov    check-version     me		  serverless.yml
_docs	     connect-platform  node_modules	  stripe
appsflyer    coverage.lcov     package-lock.json  subscriptions
audio	     daily-discussion  package.json	  test
chat	     env.example.yml   profile		  updateCloudSearch
check-email  goals	       search		  util

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

==> Circle CI detected.
    project root: .
--> token set from env
    Yaml not found, that's ok! Learn more at
==> Running gcov in . (disable via -X gcov)
==> Python coveragepy not found
==> Searching for coverage reports in:
    + .
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage.lcov bytes=73073
==> Appending adjustments
    + Found adjustments
==> Gzipping contents
==> Uploading reports
    query: branch=codecov-2&commit=35308bc713c3203ebc882d9edc059c8310eab192&build=1415&build_url=&name=&tag=&slug=shinetext%2F************&service=circleci&flags=&pr=&job=0
    -> Pinging Codecov************&service=circleci&flags=&pr=&job=0
    -> Uploading
    -> View reports at

Oh oops! Looks like I had the wrong Upload Token added in Circle. I somehow created a org-level ‘repository’ and a project-level repo in Codecov that had 2 separate upload tokens. The commit is finally showing up now in the Codecov now.

1 Like

Ah! That would explain the weird permissions errors! glad you got it working. :tada: