question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to properly upload, codecov failed with exit code 255

See original GitHub issue

I’m trying to upload codecov report for a private repo.

Upload token seems to be verified correctly, and coverage.xml is also found, but the upload still fails.

This is my first time opening an issue on Github. Apologies if I’m missing any critical information that I should provide. My workflow configuration is pretty simple and I can’t think of anything that might be causing this issue.

Configuration:

    [...]
    - name: Test
          run: make test
    - name: Upload to Codecov
      uses: codecov/codecov-action@v2.0.1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        files: ./coverage.xml
        fail_ci_if_error: true
        verbose: true

Github action log:

Processing ./coverage.xml...
Detected GitHub Actions as the CI provider.
Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.0.1-uploader-0.1.0&token=*******&branch=main&build=1052693173&build_url=https%3A%2F%2Fgithub.com%2Ffrom81%2FAirwallex-Exchange-Rate-Monitor%2Factions%2Fruns%2F1052693173&commit=4326ca4ff0912e455b2fe44dc41c99fbbc232973&job=Test%20and%20Codecov&pr=&service=github-actions&slug=from81/Airwallex-Exchange-Rate-Monitor&name=&tag=&flags=&parent=
https://codecov.io/upload/v4?package=github-action-2.0.1-uploader-0.1.0&branch=main&build=1052693173&build_url=https%3A%2F%2Fgithub.com%2Ffrom81%2FAirwallex-Exchange-Rate-Monitor%2Factions%2Fruns%2F1052693173&commit=4326ca4ff0912e455b2fe44dc41c99fbbc232973&job=Test%20and%20Codecov&pr=&service=github-actions&slug=from81/Airwallex-Exchange-Rate-Monitor&name=&tag=&flags=&parent=
        Content-Type: 'text/plain'
        Content-Encoding: 'gzip'
        X-Reduced-Redundancy: 'false'
==> Uploader SHASUM verified
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: Not Found
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2.0.1/dist/codecov' failed with exit code 255

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

9reactions
Firehedcommented, Jul 22, 2021

Same thing. Did some more digging, and I think I’ve got it figured out:

In the uploader, you validate tokens for being alphanumeric:

https://github.com/codecov/uploader/blob/b3d01c06d505b60f22e18858c997e2d20f9ccfdc/src/helpers/validate.js#L8-L10

However, tokens (at least mine) are UUIDv4 strings, which are not alphanumeric, as they contain hyphens. The code extracting tokens sees this and blanks it out as invalid. When I manually set the token in the action to notrealtoken, which is alphanumeric, I see -> Token set by environment variables in the logs, and the actual request to upload turns into a Bad Request instead of Not Found.

I think either by swapping the validator in the uploader to isUUID (assuming all of your issued tokens indeed are that format), things will work.

Additionally, you may want to enhance the output logs to indicate that you’ve found an invalid value for a token in an expected location for one in the token helper.

3reactions
Firehedcommented, Jul 21, 2021

@thomasrockhu I encountered the same issue moments ago, and it seems to still be the case:

2021-07-21T18:52:16.4749400Z ##[group]Run codecov/codecov-action@v2
2021-07-21T18:52:16.4749974Z with:
2021-07-21T18:52:16.4750977Z   token: ***
2021-07-21T18:52:16.4751429Z ##[endgroup]
2021-07-21T18:52:18.8571823Z ==> SHASUM file signed by key id 806bb28aed779869
2021-07-21T18:52:18.8600896Z [command]/home/runner/work/_actions/codecov/codecov-action/v2/dist/codecov -n  -Q github-action-2.0.1
2021-07-21T18:52:19.1204008Z 
2021-07-21T18:52:19.1205114Z      _____          _
2021-07-21T18:52:19.1206065Z     / ____|        | |
2021-07-21T18:52:19.1206741Z    | |     ___   __| | ___  ___ _____   __
2021-07-21T18:52:19.1207228Z    | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
2021-07-21T18:52:19.1207734Z    | |___| (_) | (_| |  __/ (_| (_) \ V /
2021-07-21T18:52:19.1208202Z     \_____\___/ \__,_|\___|\___\___/ \_/
2021-07-21T18:52:19.1208493Z 
2021-07-21T18:52:19.1208969Z   Codecov report uploader 0.1.0
2021-07-21T18:52:19.1347357Z => Project root located at: /home/runner/work/XXXXX
2021-07-21T18:52:19.1348868Z Searching for coverage files...
2021-07-21T18:52:19.1849367Z ==> Uploader SHASUM verified
2021-07-21T18:52:40.2712175Z => Found 4 possible coverage files:
2021-07-21T18:52:40.2714522Z coverage/coverage-final.json
2021-07-21T18:52:40.2721873Z coverage/clover.xml
2021-07-21T18:52:40.2723697Z coverage/coverage-final.json
2021-07-21T18:52:40.2724918Z coverage/lcov.info
2021-07-21T18:52:40.2726679Z Processing coverage/coverage-final.json...
2021-07-21T18:52:40.2728890Z Processing coverage/clover.xml...
2021-07-21T18:52:40.2730848Z Processing coverage/coverage-final.json...
2021-07-21T18:52:40.2732408Z Processing coverage/lcov.info...
2021-07-21T18:52:40.2779016Z Detected GitHub Actions as the CI provider.
2021-07-21T18:52:40.2790114Z Pinging Codecov: https://codecov.io/upload/v4?package=github-action-2.0.1-uploader-0.1.0&token=*******&branch=codecov-native&build=1053654892&build_url=https%3A%2F%2Fgithub.com%2FXXXXXX%2Factions%2Fruns%2F1053654892&commit=111e7400233f99d80e4fc46add390b2fbbac7375&job=Build%20and%20test&pr=&service=github-actions&slug=XXXXX&name=&tag=&flags=&parent=
2021-07-21T18:52:41.2735348Z Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: Not Found

This is on a private repo. Swapping to v1 with no other changes allowed the upload to go through.

Worth noting: the repo did not previously have codecov set up at all, and the initial setup was attempted on a branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: failed to properly upload · Issue #598 · codecov ... - GitHub
We are getting failed to properly upload errors in our codecov ... actions/codecov/codecov-action/v2/dist/codecov' failed with exit code 255.
Read more >
codecov fails in github actions - Stack Overflow
I had failing builds although I had steps setup correctly. ... name: Upload reports to codecov env: CODECOV_TOKEN: ${{secrets.
Read more >
Codecov-action failing to properly upload - Bug Fixes
I am specifying the token. - name: Upload code coverage to codecov.io uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} ...
Read more >
Command failed with exit code 255 | Tried all the solutions but ...
Hi, my issue is really driving me crazy Here is deploy logs 5:21:01 PM: Build ready to start 5:21:12 PM: build-image version: ...
Read more >
How to Set Up Codecov with C and GitHub Actions in 2022
Code coverage is a metric used to measure how much of your source code ... Since all your tests pass successfully, this should...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found