Pup - Puppeteer Bridge
Public Made by Adomby adom
pup is the AI's own browser: a real, full Chrome on the user's desktop that the AI fully controls (a sandbox, not the user's signed-in browser). Rides Bridge; pup_* verbs open windows and tabs, navigate, screenshot, and eval JS.
pup window becomes unresponsive under many heavy-SPA tabs + rapid drive; crashed renderers not surfaced or reaped
Summary
A pup window with ~10 tabs all on a heavy React SPA (wiki.adom.inc) went unresponsive after I rapidly drove ONE tab with a tight navigate -> eval -> screenshot loop. The pup bridge itself stayed up (v1.9.77, browser_readiness ok), but the window froze and several Chrome-for-Testing processes dropped to 8-12 MB, the signature of crashed renderer processes. pup should survive this: a crashed tab renderer should be isolated and surfaced, not silently wedge the window.
Environment
- puppeteer bridge v1.9.77, native-browser v0.1.49, on AdomLapper (Windows)
- Chrome for Testing
- Session:
fusion-wiki-review-<ts>, 10 tabs, all wiki.adom.inc (one also blog.autodesk.io)
What I did (repro)
browser_open_window+ 9xbrowser_open_tab, all pointing at wiki.adom.inc pages (the wiki is a React SPA that, per tab, opens persistent LaunchDarkly streaming connections plus a Cloudflare beacon; see console noise below).- On tab-1, in tight succession and without waiting for load to settle between calls:
- multiple
browser_navigateto the same URL with churning?cb=<ts>/?z=<ts>cache-bust params - several
browser_eval, including one that ran an in-pagefetch('/adom/...')of a full SPA page and a heavymatchAllregex over the returned HTML - several
browser_screenshot browser_alert_window(taskbar flash)
- multiple
Shortly after, the tab stopped responding (the user reported pup 'crashed'). browser_screenshot began timing out.
Evidence
- Crashed renderers:
process_list nameFilter=chromeshowed 5 Chrome-for-Testing processes at 8-12 MB each (healthy Chrome processes are far larger). - Not reaped on close:
browser_close_window {includeSpawned:true}returned ok, but the 5 low-memory CfT processes remained afterward. (Related to #14 'sessions never reaped', but here it's crashed-renderer cleanup specifically.) - Bridge log for the session, dozens of these per tab, so 10 tabs held many live streams at once:
[pup console .../tab-1 info] [LaunchDarkly] Opening stream connection to https://clientstream.launchdarkly.com/eval/... [pup console .../tab-1 info] Connecting to 'https://app.launchdarkly.com/sdk/goals/...' [pup console .../tab-1 error] Failed to load resource: 404 (cloudflareinsights beacon) [pup console .../tab-1 error] CSP directive 'script-src' contains an invalid source
Likely cause
Ten heavy-SPA tabs each holding open streaming connections is already high load; the rapid navigate/eval/screenshot churn on top (especially an in-page fetch + regex while other navigations were in flight) tipped Chrome for Testing over, and one or more renderer processes crashed. CfT may also be running with tighter resource limits than a normal Chrome.
What pup should do (the actual asks)
- Survive a renderer crash. Chrome normally isolates a per-tab renderer crash ('Aw, Snap' on that tab only). pup should detect
Target crashed/Inspector.targetCrashedon the CDP session and surface it as a clear verb error, not let the window hang. - Never hang silently. If a tab's renderer is gone,
browser_screenshot/browser_evalshould fast-fail with 'tab renderer crashed, reload the tab', not time out. - Reap crashed renderers on close.
browser_close_windowshould clean up orphaned/crashed CfT child processes for the session (overlaps #14). - Optional guardrails. Consider a soft cap or warning on concurrent heavy tabs, and serialize navigate/eval/screenshot per tab so an in-flight navigation isn't racing an eval/screenshot on the same target.
My side
I also over-drove one tab (rapid navigate loops + in-page fetch). I've stopped that pattern and will serialize + wait-for-load between calls. But per John: pup crashing at all from client usage is a bridge bug, the client shouldn't be able to wedge it, hence this report.
Filed by Claude (the fusion-bridge thread) on John's request.