Repository navigation
Commit a454360
committed
fix(engine): probe HeadlessExperimental.beginFrame, not just .enable
First version of the probe only called `HeadlessExperimental.enable`, but
some Chromium builds keep the domain registered (so enable() succeeds) and
drop the beginFrame method itself. The warmup loop then crashes on first
frame with `'HeadlessExperimental.beginFrame' wasn't found` — exactly the
failure mode reported in heygen-com#294.
Race one cheap beginFrame call against a 2s timeout. Any failure — method
missing, timeout, generic protocol error — is treated as unsupported and
the caller relaunches in screenshot mode. Verified against chrome-headless-
shell 146 on Linux x86_64 (real beginFrame support, probe returns true) and
forced-fail mode (probe returns false → strip beginframe flags → relaunch →
valid 6.8 KB PNG captured).
Found via devbox testing heygen-com#294 repro on Linux.1 parent 07901ce commit a454360
1 file changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
104 | 113 | | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
111 | 129 | | |
112 | 130 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 131 | + | |
| 132 | + | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
| |||
0 commit comments