Fix Windows console window for chrome-headless-shell - #3432
Draft
aryansk wants to merge 1 commit into
Draft
Conversation
Every 'npx hyperframes render' on Windows flashed a visible CMD window for each shot (78 windows for 78 shots). chrome-headless-shell is a console-subsystem binary, so Node's spawn shows a console window unless windowsHide:true (CREATE_NO_WINDOW) is set. Puppeteer-core's launch spawns the browser via child_process.spawn without windowsHide by default. Add windowsHide:true to all puppeteer.launch sites so the browser is hidden on Windows. Fixes heygen-com#3430
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3430
Problem
On Windows, every
npx hyperframes renderflashed a visible CMD/console window for each shot (78 windows for 78 shots).chrome-headless-shell.exeis a console-subsystem binary, so Node'schild_process.spawnshows a console window unlesswindowsHide: true(CREATE_NO_WINDOW) is set.puppeteer-core'slaunchspawns the browser withoutwindowsHideby default, so the window was visible on every launch, even from GUI apps with no terminal.Change
Add
windowsHide: trueto allpuppeteer.launchsites so the browser is launched hidden on Windows:packages/engine/src/services/browserManager.ts(pooled browser forhyperframes render)packages/cli/src/capture/*,packages/cli/src/beats/headlessAnalyzer.ts,packages/cli/src/commands/*,packages/studio/vite.browser.ts,packages/producer/src/parity-harness.tsOn non-Windows platforms
windowsHideis ignored.Validation
git diff --checkcleanpuppeteer.launchoptions; existingchrome-headless-shellpath resolution and launch-arg tests expected to be unaffected