Skip to content

Commit 14eb892

Browse files
committed
docs(engine): correct version attribution for beginFrame probe
Chromium 132 removed the old `--headless` mode from the main Chrome binary, not the HeadlessExperimental CDP domain. The domain is still upstream (enable/disable are deprecated but beginFrame is not) — what actually dropped in user reports is chrome-headless-shell 147+ builds, which is where issue heygen-com#294 reproduces. Rewrites the doc comment and the inline comment in acquireBrowser to attribute the breakage to chrome-headless-shell 147 rather than all of Chromium 132+. No behavioural change. Per review feedback on heygen-com#296.
1 parent a454360 commit 14eb892

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

‎packages/engine/src/services/browserManager.ts‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ function stripBeginFrameFlags(args: string[]): string[] {
100100
/**
101101
* Probe whether the browser still speaks HeadlessExperimental.beginFrame.
102102
*
103-
* Some Chromium builds keep the domain registered (HeadlessExperimental.enable
104-
* succeeds) but drop the beginFrame method itself — in that case the capture
105-
* loop dies on first frame with `'HeadlessExperimental.beginFrame' wasn't
106-
* found`. So we probe BOTH: enable + one cheap beginFrame. The beginFrame is
107-
* raced against a 2s timeout because in beginframe-control mode the command
108-
* completes as soon as the compositor acks — no network or GPU work involved.
103+
* Recent chrome-headless-shell builds (observed on 147) expose the domain
104+
* well enough that HeadlessExperimental.enable succeeds but drop the
105+
* beginFrame method itself — the capture loop then dies on first frame with
106+
* `'HeadlessExperimental.beginFrame' wasn't found`. So we probe BOTH: enable
107+
* + one cheap beginFrame raced against a 2s timeout. In beginframe-control
108+
* mode the command completes as soon as the compositor acks, so a real
109+
* supported browser returns well under the timeout.
109110
*
110111
* Any failure (method missing, timeout, protocol error) is treated as
111112
* unsupported. Real errors after launch would surface in the warmup loop and
@@ -181,10 +182,11 @@ export async function acquireBrowser(
181182
protocolTimeout,
182183
});
183184

184-
// Probe HeadlessExperimental availability — Chromium 132+ removed it and
185-
// we'd otherwise render blank frames because `--enable-begin-frame-control`
186-
// leaves the compositor waiting for beginFrames we can't send. Auto-fall
187-
// back to screenshot mode with the appropriate flags.
185+
// Probe HeadlessExperimental.beginFrame — recent chrome-headless-shell
186+
// builds (observed on 147) dropped the method while keeping the flags
187+
// valid, so `--enable-begin-frame-control` leaves the compositor waiting
188+
// for beginFrames the engine can no longer send. Auto-fall back to
189+
// screenshot mode with the appropriate flags.
188190
if (captureMode === "beginframe") {
189191
const supported = await probeBeginFrameSupport(browser).catch(() => true);
190192
if (!supported) {

0 commit comments

Comments
 (0)