Skip to content

fix(windows): hide console window when launching headless browsers#41633

Open
triemerge wants to merge 1 commit into
microsoft:mainfrom
triemerge:fix/windows-hide-console
Open

fix(windows): hide console window when launching headless browsers#41633
triemerge wants to merge 1 commit into
microsoft:mainfrom
triemerge:fix/windows-hide-console

Conversation

@triemerge

Copy link
Copy Markdown
Contributor

Rationale

The tricky part here is that launchProcess() is shared by all browser launches, including headed ones like codegen and Inspector. Setting windowsHide unconditionally would hide those too, so it needs to be opt-in and only kick in for headless launches.

While at it, also applied it to the ffmpeg and taskkill spawns since neither of those should be showing a console window either.

Fixes #41630

@yury-s

yury-s commented Jul 8, 2026

Copy link
Copy Markdown
Member

How do we ensure it does not introduce the same regression that required reverting previous fix in #39994 ?

@triemerge

Copy link
Copy Markdown
Contributor Author

How do we ensure it does not introduce the same regression that required reverting previous fix in #39994 ?

The previous fix just set it unconditionally inside launchProcess so headed stuff like codegen and UI mode got caught in it too. This time around it's opt-in, so only headless launches actually get the flag. Headed ones don't get it at all since options.headless is false for them, so there's no change in behavior there.

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.

[Bug]: Windows console window pops up when launching chrome-headless-shell (processLauncher missing windowsHide)

2 participants