-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix: don't show EPIPE error #32873
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
base: develop
Are you sure you want to change the base?
fix: don't show EPIPE error #32873
Conversation
|
|
The failures appear to be unrelated to the PR |
|
@alexsch01 Thanks, we'll review when we have time and also make sure tests pass and merge. |
|
The readme change entry is in the wrong spot but I'm not going to fix it until all potential checks are complete |
AtofStryker
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we would want to block all broken pipe errors coming back from the process but I can't think of a reason as to what specifically. So I'm OK moving forward with the change. @cacieprins cam you think of a scenario where this would be problematic?
@alexsch01 are you able to add a unit test to https://github.com/cypress-io/cypress/blob/develop/packages/data-context/test/unit/data/ProjectConfigIpc.spec.ts
| if (err.code === 'EPIPE') { | ||
| debug('EPIPE error in loadConfig() of child process %s', err) | ||
| return | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Unhandled Errors: Promises Hang Forever
When an EPIPE error occurs, the handler returns early without resolving or rejecting the promise, causing loadConfig() to hang indefinitely. The promise expects either a loadConfig:reply or loadConfig:error event to settle, but the early return prevents proper cleanup and leaves callers waiting forever.
| if (err.code === 'EPIPE') { | ||
| debug('EPIPE error in registerSetupIpcHandlers() of child process %s', err) | ||
| return | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Early Return Traps Promises Indefinitely
When an EPIPE error occurs, the handler returns early without resolving or rejecting the promise, causing registerSetupIpcHandlers() to hang indefinitely. The promise expects either a setupTestingType:reply or setupTestingType:error event to settle, but the early return prevents proper cleanup and leaves callers waiting forever.
Since the original issue happens sporadically when doing CTRL+C, it's tricky to test this |
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Suppresses EPIPE errors from the config child process (e.g., after Ctrl+C) and documents the fix in the changelog.
packages/data-context/src/data/ProjectConfigIpc.ts, ignoreEPIPEin child processerrorhandlers withinloadConfig()andregisterSetupIpcHandlers(); add explicitNodeJS.ErrnoExceptiontyping.cli/CHANGELOG.mdwith bugfix note: avoidEPIPEerror afterCTRL+C.Written by Cursor Bugbot for commit daeab02. This will update automatically on new commits. Configure here.