Failed to properly upload, codecov failed with exit code 255
See original GitHub issueI’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:
- Created 2 years ago
- Reactions:5
- Comments:16 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
@thomasrockhu I encountered the same issue moments ago, and it seems to still be the case:
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.