vercel-labs/agent-browser · error
No React renderer attached - the page has not booted React y
Error message
No React renderer attached - the page has not booted React yet
What it means
The DevTools hook exists, but __abPickReactRendererId could not yield a renderer whose rendererInterfaces entry is usable. React only registers a renderer against the hook while booting, so this means the page's React has not initialized (or the page is not React at all). The snapshot cannot proceed because the tree is read through the renderer interface.
Source
Thrown at cli/src/native/react/scripts.rs:55
if (rootsOf(id) > 0) {
if (firstWithRoots === null) firstWithRoots = id;
if (!isFlight(id)) return id;
}
}
return firstWithRoots !== null ? firstWithRoots : firstAny;
}
"#;
/// Build a no-argument async IIFE page-eval that returns the component tree as
/// JSON.
pub const TREE_SNAPSHOT: &str = r#"
(async () => {
const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
if (!hook) throw new Error("React DevTools hook not installed - relaunch with --enable react-devtools");
{{PICK_RI}}
const __abRiId = __abPickReactRendererId(hook);
const ri = (__abRiId != null && hook.rendererInterfaces && hook.rendererInterfaces.get) ? hook.rendererInterfaces.get(__abRiId) : null;
if (!ri) throw new Error("No React renderer attached - the page has not booted React yet");
const batches = await new Promise((resolve) => {
const out = [];
const origEmit = hook.emit;
hook.emit = function (event, payload) {
if (event === "operations") out.push(Array.from(payload));
return origEmit.apply(hook, arguments);
};
ri.flushInitialOperations();
setTimeout(() => {
hook.emit = origEmit;
resolve(out);
}, 50);
});
const nodes = batches.flatMap((ops) => {
let i = 2;
const strings = [null];View on GitHub (pinned to 548b159b30)
Solutions
- Wait for the app to boot, then retry: 'agent-browser wait "#root"' or 'agent-browser wait --load load' followed by 'react tree'
- Confirm the page actually uses React (look for data-reactroot, React-specific globals, or the framework in the bundle)
- Re-navigate after confirming the session was launched with '--enable react-devtools' — a hook added after first load never sees an already-booted React
Example fix
# before agent-browser open https://app --enable react-devtools agent-browser react tree # renderer not attached yet # after agent-browser open https://app --enable react-devtools agent-browser wait "#root" --timeout 15000 agent-browser react tree
Defensive patterns
Strategy: validation
Validate before calling
agent-browser eval "Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.renderers ?? {}).length > 0"
# true once React has booted and registered a renderer Type guard
function hasReactRenderer(win: Window): boolean {
const hook = (win as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
return hook != null && Object.keys(hook.renderers ?? {}).length > 0;
} Prevention
- Wait for the app root element or a renderer count > 0 before snapshotting
- Confirm the page actually uses React before reaching for react subcommands
- On SSR apps, wait for hydration (e.g. wait for interactive markers) rather than load state alone
When it happens
Trigger: Calling 'react tree' while the React bundle is still downloading/executing; on a server-rendered page before hydration; on a page that does not use React; immediately after 'agent-browser open' before the app boots.
Common situations: Slow networks or large bundles where React boots seconds after load; hydration-gated apps; testing static or non-React pages by mistake; racing the snapshot right after navigation.
Related errors
- No React renderer attached
- inspect failed: ${result && result.type}
- React DevTools hook not installed - relaunch with --enable r
- renders recording not active - run `react renders start` fir
AI-assisted analysis of vercel-labs/agent-browser@548b159b30 (2026-08-16).
Data as JSON: /api/errors/70e3ff1426a81089.
Report an issue: GitHub.