Skip to content

Conversation

@alexsch01
Copy link
Contributor

@alexsch01 alexsch01 commented Nov 3, 2025

Additional details

Steps to test

How has the user experience changed?

PR Tasks


Note

Suppresses EPIPE errors from the config child process (e.g., after Ctrl+C) and documents the fix in the changelog.

  • Backend:
    • In packages/data-context/src/data/ProjectConfigIpc.ts, ignore EPIPE in child process error handlers within loadConfig() and registerSetupIpcHandlers(); add explicit NodeJS.ErrnoException typing.
  • Docs:
    • Update cli/CHANGELOG.md with bugfix note: avoid EPIPE error after CTRL+C.

Written by Cursor Bugbot for commit daeab02. This will update automatically on new commits. Configure here.

@cypress-app-bot
Copy link
Collaborator

@alexsch01
Copy link
Contributor Author

The failures appear to be unrelated to the PR

@mschile mschile requested a review from AtofStryker November 4, 2025 17:37
@jennifer-shehane
Copy link
Member

@alexsch01 Thanks, we'll review when we have time and also make sure tests pass and merge.

@alexsch01
Copy link
Contributor Author

The readme change entry is in the wrong spot but I'm not going to fix it until all potential checks are complete

Copy link
Contributor

@AtofStryker AtofStryker left a 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
}
Copy link

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.

Fix in Cursor Fix in Web

if (err.code === 'EPIPE') {
debug('EPIPE error in registerSetupIpcHandlers() of child process %s', err)
return
}
Copy link

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.

Fix in Cursor Fix in Web

@alexsch01
Copy link
Contributor Author

@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

Since the original issue happens sporadically when doing CTRL+C, it's tricky to test this

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

Successfully merging this pull request may close these issues.

Error: write EPIPE after CTRL+C in terminal

4 participants