{"record":{"id":"70e3ff1426a81089","repo":"vercel-labs/agent-browser","slug":"no-react-renderer-attached-the-page-has-not-boot","errorCode":null,"errorMessage":"No React renderer attached - the page has not booted React yet","messagePattern":"No React renderer attached - the page has not booted React yet","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/src/native/react/scripts.rs","lineNumber":55,"sourceCode":"      if (rootsOf(id) > 0) {\n        if (firstWithRoots === null) firstWithRoots = id;\n        if (!isFlight(id)) return id;\n      }\n    }\n    return firstWithRoots !== null ? firstWithRoots : firstAny;\n  }\n\"#;\n\n/// Build a no-argument async IIFE page-eval that returns the component tree as\n/// JSON.\npub const TREE_SNAPSHOT: &str = r#\"\n(async () => {\n  const hook = window.__REACT_DEVTOOLS_GLOBAL_HOOK__;\n  if (!hook) throw new Error(\"React DevTools hook not installed - relaunch with --enable react-devtools\");\n{{PICK_RI}}\n  const __abRiId = __abPickReactRendererId(hook);\n  const ri = (__abRiId != null && hook.rendererInterfaces && hook.rendererInterfaces.get) ? hook.rendererInterfaces.get(__abRiId) : null;\n  if (!ri) throw new Error(\"No React renderer attached - the page has not booted React yet\");\n\n  const batches = await new Promise((resolve) => {\n    const out = [];\n    const origEmit = hook.emit;\n    hook.emit = function (event, payload) {\n      if (event === \"operations\") out.push(Array.from(payload));\n      return origEmit.apply(hook, arguments);\n    };\n    ri.flushInitialOperations();\n    setTimeout(() => {\n      hook.emit = origEmit;\n      resolve(out);\n    }, 50);\n  });\n\n  const nodes = batches.flatMap((ops) => {\n    let i = 2;\n    const strings = [null];","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/vercel-labs/agent-browser/blob/548b159b30eef119ccf6846c8bc807d0eaa3f6f8/cli/src/native/react/scripts.rs#L37-L73","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\nagent-browser open https://app --enable react-devtools\nagent-browser react tree   # renderer not attached yet\n\n# after\nagent-browser open https://app --enable react-devtools\nagent-browser wait \"#root\" --timeout 15000\nagent-browser react tree","handlingStrategy":"validation","validationCode":"agent-browser eval \"Object.keys(window.__REACT_DEVTOOLS_GLOBAL_HOOK__?.renderers ?? {}).length > 0\"\n# true once React has booted and registered a renderer","typeGuard":"function hasReactRenderer(win: Window): boolean {\n  const hook = (win as any).__REACT_DEVTOOLS_GLOBAL_HOOK__;\n  return hook != null && Object.keys(hook.renderers ?? {}).length > 0;\n}","tryCatchPattern":null,"preventionTips":["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"],"tags":["react","timing","hydration","devtools"],"backgroundTag":null,"analyzedSha":"548b159b30eef119ccf6846c8bc807d0eaa3f6f8","analyzedAt":"2026-08-16T10:12:14.925Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}