codecov-action icon indicating copy to clipboard operation
codecov-action copied to clipboard

"Error: Codecov: Failed to write uploader binary"

Open MysterAitch opened this issue 2 years ago • 4 comments

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/[email protected]
  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 avatar Mar 20 '22 20:03 MysterAitch

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

MysterAitch avatar Mar 20 '22 20:03 MysterAitch

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

nagyesta avatar Dec 09 '22 07:12 nagyesta

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 avatar Mar 23 '23 02:03 thomasrockhu-codecov

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 avatar Nov 09 '23 06:11 thomasrockhu-codecov