vercel-labs/agent-browser · error
No React renderer attached
Error message
No React renderer attached
What it means
Same renderer guard as the tree snapshot, but inside TREE_INSPECT ('react inspect <id>'): the hook is present yet rendererInterfaces has no usable renderer for the picked id. Usually means the page reloaded or React re-initialized between the snapshot that produced the id and the inspect call, or the page never booted React.
Source
Thrown at cli/src/native/react/scripts.rs:143
let j = i + 2;
for (let c = 0; c < ops[i + 1]; c++) j += 5 + ops[j + 4];
return j - i;
}
});
return JSON.stringify(nodes);
})()
"#;
/// Template for `inspect` — replace {{ID}} with the numeric fiber id.
pub const TREE_INSPECT: &str = r#"
(() => {
const id = {{ID}};
const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;
{{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");
if (!ri.hasElementWithId(id)) throw new Error("element " + id + " not found (page reloaded?)");
const result = ri.inspectElement(__abRiId, id, null, true);
if (!result || result.type !== "full-data") {
throw new Error("inspect failed: " + (result && result.type));
}
const v = result.value;
const name = ri.getDisplayNameForElementID(id);
const lines = [name + " #" + id];
if (v.key != null) lines.push("key: " + JSON.stringify(v.key));
section("props", v.props);
section("hooks", v.hooks);
section("state", v.state);
section("context", v.context);
if (v.owners && v.owners.length) {
lines.push("rendered by: " + v.owners.map((o) => o.displayName).join(" > "));
}
const source = Array.isArray(v.source)
? [v.source[1], v.source[2], v.source[3]]View on GitHub (pinned to 548b159b30)
Solutions
- Take a fresh tree ('react tree') and inspect the newly returned fiber id
- Add a wait for the app root or React boot before inspecting
- Keep snapshot and inspect adjacent in your automation to shrink the race window
Example fix
# before agent-browser react inspect 42 # page reloaded since snapshot # after agent-browser react tree # fresh ids agent-browser react inspect 17 # id from the new snapshot
Defensive patterns
Strategy: validation
Validate before calling
agent-browser eval "Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.renderers ?? {}).length > 0" Type guard
function canInspect(win: Window): boolean {
const hook = (win as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;
return hook != null && Object.keys(hook.renderers ?? {}).length > 0;
} Prevention
- Treat fiber ids as valid only for the current document — re-snapshot after any navigation
- Run tree and inspect back-to-back in the same automation step
- Watch for reload indicators (url changes, snapshot diffs) before inspecting
When it happens
Trigger: Running 'react inspect <id>' on a page that reloaded since the snapshot; inspecting right after 'agent-browser open' before React boots; inspecting on a non-React page.
Common situations: Long gaps between snapshot and inspect in an agent workflow (page auto-refresh, redirects, logout timers); SPAs that remount on route changes.
Related errors
- inspect failed: ${result && result.type}
- No React renderer attached - the page has not booted React y
- React DevTools hook not installed - relaunch with --enable r
- renders recording not active - run `react renders start` fir
- agent-browser ${args[0] ?? ""} failed: ${envelope.error ?? "
AI-assisted analysis of vercel-labs/agent-browser@548b159b30 (2026-08-16).
Data as JSON: /api/errors/5f4478eec914aad6.
Report an issue: GitHub.