Skip to content

fix(launcher): resolve close on process 'exit' rather than stdio 'close'#41211

Open
danymarques wants to merge 1 commit into
microsoft:mainfrom
danymarques:main
Open

fix(launcher): resolve close on process 'exit' rather than stdio 'close'#41211
danymarques wants to merge 1 commit into
microsoft:mainfrom
danymarques:main

Conversation

@danymarques

@danymarques danymarques commented Jun 9, 2026

Copy link
Copy Markdown

Resolve launchProcess cleanup on the child process 'exit' event (run once, with 'close' as a fallback) instead of waiting for 'close'.

The 'close' event waits for stdio EOF, which a grandchild that inherits the browser's stdio pipe — such as msedge's EdgeUpdater — can hold open for ~20s after the browser has exited, delaying browser.close(). Add a launchProcess regression test covering this.

#41210

Resolve launchProcess cleanup on the child process 'exit' event (run once, with 'close' as a\nfallback) instead of waiting for 'close'.

The 'close' event waits for stdio EOF, which a grandchild that inherits the browser's stdio pipe\n— such as msedge's EdgeUpdater — can hold open for ~20s after the browser has exited, delaying\nbrowser.close(). Add a launchProcess regression test covering this.
// example msedge spawning EdgeUpdater — can keep the pipe open long after the
// browser process exits, which would otherwise delay close() until that grandchild
// exits. 'exit' always precedes 'close', so run the handler at most once.
const onProcessGone = (exitCode: number | null, signal: NodeJS.Signals | null) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are almost always regressions whenever this code is modified as it is used by everything

typically we use launch flags to disable stuff like this, so perhaps we're not doing that correctly or something changed recently in Edge?

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

1 failed
❌ [webkit] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-ubuntu-latest-webkit

7265 passed, 1119 skipped


Merge workflow run.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

6 failed
❌ [webkit-library] › library/video.spec.ts:546 › screencast › should throw if browser dies @webkit-ubuntu-22.04-node20
❌ [playwright-test] › web-server.spec.ts:854 › gracefulShutdown option › can be configured to send SIGINT @macos-latest-node22
❌ [playwright-test] › web-server.spec.ts:854 › gracefulShutdown option › can be configured to send SIGINT @ubuntu-latest-node20
❌ [playwright-test] › web-server.spec.ts:854 › gracefulShutdown option › can be configured to send SIGINT @ubuntu-latest-node24
❌ [playwright-test] › web-server.spec.ts:854 › gracefulShutdown option › can be configured to send SIGINT @ubuntu-latest-node22
❌ [playwright-test] › web-server.spec.ts:854 › gracefulShutdown option › can be configured to send SIGINT @ubuntu-latest-node26

4 flaky ⚠️ [chromium-library] › library/video.spec.ts:647 › screencast › should capture full viewport `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@webkit-ubuntu-22.04-node20`
⚠️ [playwright-test] › ui-mode-trace.spec.ts:816 › should update state on subsequent run `@windows-latest-node22`

39500 passed, 774 skipped


Merge workflow run.

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.

2 participants