Error: EBADF: Closing file descriptor on garbage collection failed
See original GitHub issueDescribe the bug
When using the “Spec to STDOUT, produce a combined Mochawesome JSON file” config from the Cypress docs, we are seeing the test runs fail after an arbitrary number of tests (we have 30 tests in 7 files in total).
Running: examples/login_page.js (3 of 7)
[Error: EBADF: Closing file descriptor 110 on garbage collection failed, close
] {
errno: -9,
code: 'EBADF',
syscall: 'close'
}
Error: EBADF: Closing file descriptor 110 on garbage collection failed, close
[42:1104/125012.598646:FATAL:scoped_file.cc(43)] Check failed: . : Bad file descriptor (9)
The Test Runner unexpectedly exited via a exit event with signal SIGTRAP
Code Reproduce
We’re invoking our test runs with:
docker-compose exec cypress bash -c "yarn && cypress run --reporter mochawesome --reporter-options reportDir="cypress/results",overwrite=false,html=false,json=true "
I haven’t had time to try to recreate this in a toy example yet. Will update here if I do.
Expected behavior
All tests should run until the end, and should emit one log file per file
Screenshots N/A
Environment (please complete the following information):
- Platform: docker MacOS (cypress/included:6.8.0)
- mochawesome version: 7.0.0
- mochawesome-merge version: “^4.2.0”
- mocha (or other test library) version: Cypress 6.8.0
- Node version:
Additional context
We recently upgraded from "mochawesome": "6.2.2"
to "mochawesome": "^7.0.0"
and did not have this problem before.
From playing around with it, the problem seems to be caused by overwrite=false
. I’ve tried replacing with timestamp=true
and everything worked as expected.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:6 (3 by maintainers)
Top GitHub Comments
Fix has been released in mochawesome v7.0.1
@adamgruber, I have created a reproducible example in https://github.com/tit/mochawesome-issue-363
Versions