Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error: Codecov: Failed to write uploader binary" #678

Closed
MysterAitch opened this issue Mar 20, 2022 · 5 comments
Closed

"Error: Codecov: Failed to write uploader binary" #678

MysterAitch opened this issue Mar 20, 2022 · 5 comments

Comments

@MysterAitch
Copy link

Hi, We keep experiencing the CodeCov Action failing.

  • The error is frequently about not being able to write the uploader binary.
  • The failure happens probably once every 50-75 uploads or so.
  • The GitHub Actions are matrix builds with about 25 builds per PR, with two uploads per action.
  • Failure is (probably) usually on the second upload.
  • Rerunning the action (i.e., doing the build, running the tests, regenerating coverage data, and re-attempting the upload) appears to always work

Advice / a fix for this would be gratefully received as we frequently have PRs fail due to only one of the matrix builds failing on the code coverage upload step.

Run codecov/codecov-action@v2.1.0
  with:
    file: javaparser-symbol-solver-testing/target/site/jacoco/jacoco.xml
    fail_ci_if_error: true
    verbose: false
    flags: javaparser-symbol-solver,AlsoSlowTests,windows-latest,jdk-9
    env_vars: OS,JDK
  env:
    OS: windows-latest
    JDK: 9
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Zulu_jdk\9.0.7-0\x64
==> windows OS detected
Error: Codecov: Failed to write uploader binary: EPERM: operation not permitted, open 'D:\a\_actions\codecov\codecov-action\v2.1.0\dist\codecov.exe'

image

@MysterAitch
Copy link
Author

To add: I am pretty sure this only ever happens on Windows runners, but no pattern to Windows / JDK combinations (screenshot above is windows-latest and JDK9, but I've seen it also fail with windows and JDK 8/9/12/15).

@nagyesta
Copy link

nagyesta commented Dec 9, 2022

Hi,
started to face the same problem recently. Happens only on Windows runners, but it is failing builds more often in my case.
I have 10 upload steps in the same workflow and it has failed in the 3rd, 4th, 5th, 8th, 10th so far as far as I can remember (but never the first). I am thinking of adding some wait before their execution to see whether only the file/process remains stuck for a bit.
This is my workflow if that helps: https://github.com/nagyesta/abort-mission/blob/e585d43ea94247b99ee3b35734903c05f36bc2dc/.github/workflows/gradle-ci.yml

@thomasrockhu-codecov
Copy link
Contributor

As it's been awhile, I'm not sure I can help without logs. Please open a topic in our community boards if this is still being a problem. I'll do my best to help debug there.

@thomasrockhu-codecov
Copy link
Contributor

I'm starting to see it now too https://github.com/codecov/codecov-action/actions/runs/6793854201/job/18469361585?pr=1161, I'll try to dig in

@thomasrockhu-codecov
Copy link
Contributor

@MysterAitch this took me a long time to get to. But I think I made a few fixes here that I forgot to mention on this issue. I haven't seen this breakage in quite a long time, and I hope that you haven't either. If you have, please feel free to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants