{"record":{"id":"17b2790631da45a7","repo":"Mintplex-Labs/anything-llm","slug":"no-websocketdebuggerurl-is-chromium-running","errorCode":null,"errorMessage":"No webSocketDebuggerUrl — is Chromium running?","messagePattern":"No webSocketDebuggerUrl — is Chromium running\\?","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"open-computer/services/interface-service/utils/cdp-eval.js","lineNumber":71,"sourceCode":"      ws.off(\"message\", handler);\n      clearTimeout(timeout);\n      if (parsed.error) {\n        reject(new Error(`CDP error: ${parsed.error.message}`));\n      } else {\n        resolve(parsed.result);\n      }\n    }\n\n    ws.on(\"message\", handler);\n    ws.send(JSON.stringify(msg));\n  });\n}\n\nasync function main() {\n  const versionRaw = await httpGet(\"http://127.0.0.1:9222/json/version\");\n  const version = JSON.parse(versionRaw);\n  const browserWsUrl = version.webSocketDebuggerUrl;\n  if (!browserWsUrl) throw new Error(\"No webSocketDebuggerUrl — is Chromium running?\");\n\n  const ws = await new Promise((resolve, reject) => {\n    const socket = new WebSocket(browserWsUrl);\n    const t = setTimeout(() => reject(new Error(\"WS connect timeout\")), 5000);\n    socket.on(\"open\", () => { clearTimeout(t); resolve(socket); });\n    socket.on(\"error\", (err) => { clearTimeout(t); reject(err); });\n  });\n\n  try {\n    const { targetInfos } = await cdpSend(ws, \"Target.getTargets\");\n    const pages = targetInfos.filter(\n      (t) => t.type === \"page\" && !t.url.startsWith(\"chrome://\") && !t.url.startsWith(\"devtools://\")\n    );\n    if (pages.length === 0) throw new Error(\"No browser pages open.\");\n\n    let target = pages[pages.length - 1];\n    if (targetUrl) {\n      const match = pages.find(","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/526360e320da9d1b36074be5ed64fe76e5bbfbbd/open-computer/services/interface-service/utils/cdp-eval.js#L53-L89","documentation":"Thrown by cdp-eval.js when GET http://127.0.0.1:9222/json/version succeeds (so Chromium is partly up) but the returned JSON lacks webSocketDebuggerUrl. That URL is the browser-level CDP endpoint; its absence means Chromium was not started with --remote-debugging-port, or the build does not expose the debugging endpoint. This is a hard failure — without it, no CDP session can be opened.","triggerScenarios":"Chromium/Chrome launched without --remote-debugging-port=9222; a different process is bound to 127.0.0.1:9222; a stripped Chromium build with debugging disabled; the version endpoint is reachable but returned a malformed/minimal JSON.","commonSituations":"User started Chrome normally instead of through the open-computer launcher; port 9222 already taken by another Chrome instance; security policy stripped debugging flags; headless mode launched with --headless=old vs new differing in CDP exposure.","solutions":["Relaunch Chromium with --remote-debugging-port=9222 (and --remote-allow-origins=* if connecting cross-origin).","Ensure no other Chrome instance is already bound to 9222.","Verify GET http://127.0.0.1:9222/json/version returns JSON containing webSocketDebuggerUrl before invoking cdp-eval.","Use the open-computer launcher which sets the flags correctly."],"exampleFix":"# before\nchromium-browser\n\n# after\nchromium-browser --remote-debugging-port=9222 --remote-allow-origins=*","handlingStrategy":"validation","validationCode":"// Probe the CDP version endpoint before invoking cdp-eval.\nasync function cdpReady() {\n  try {\n    const v = JSON.parse(await httpGet('http://127.0.0.1:9222/json/version'));\n    return typeof v.webSocketDebuggerUrl === 'string';\n  } catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"if (!await cdpReady()) {\n  console.error('Start Chromium with --remote-debugging-port=9222');\n  process.exit(2);\n}","preventionTips":["Always launch Chromium with --remote-debugging-port=9222.","Add --remote-allow-origins=* for cross-origin CDP.","Use the open-computer launcher to guarantee the flags are set."],"tags":["cdp","chromium","browser-debugging","config","setup"],"backgroundTag":null,"analyzedSha":"526360e320da9d1b36074be5ed64fe76e5bbfbbd","analyzedAt":"2026-08-13T01:45:47.170Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}