Commit 0bf8d55
fix: protocolTimeout for heavy pages + attach-mode arg cleanup
Two reliability fixes for symptoms hit on real workloads:
1. Heavy pages (e.g. Studio module dev bundles >100MB) cannot ack
`Network.enable` and other auto-attached domain calls within
puppeteer's default 180s timeout. Once it fires, the CDP connection
is marked dead and every subsequent call throws — only daemon
restart recovers. Bump `protocolTimeout` to 10min for both
`puppeteer.connect` and `puppeteer.launch`, env-overridable via
`BRAVE_DEVTOOLS_PROTOCOL_TIMEOUT_MS`.
2. `start --browserUrl X` was emitting `--browser-url X --headless
--isolated` in the daemon args because the spawn-mode defaults
(`headless: true`, `isolated: true`) were applied unconditionally
after yargs parsing. The runtime resolver ignored them under attach
mode but `status` showed misleading args, and the silent fallthrough
would become a real bug if the resolver order ever changed. Detect
attach mode (`browserUrl` / `wsEndpoint` / `autoConnect`) and strip
spawn-only flags before serializing.
Smoke-tested both modes: attach now reports
`args=[--browser-url X, --category-..., ...]` and spawn still gets
`[--headless, --isolated, ...]`.
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1cbc585 commit 0bf8d55
2 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
106 | 123 | | |
107 | 124 | | |
108 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | 36 | | |
26 | 37 | | |
| |||
189 | 200 | | |
190 | 201 | | |
191 | 202 | | |
| 203 | + | |
192 | 204 | | |
193 | 205 | | |
194 | 206 | | |
| |||
340 | 352 | | |
341 | 353 | | |
342 | 354 | | |
| 355 | + | |
343 | 356 | | |
344 | 357 | | |
345 | 358 | | |
| |||
0 commit comments