Mintplex-Labs/anything-llm · critical · Error

No webSocketDebuggerUrl — is Chromium running?

Error message

No webSocketDebuggerUrl — is Chromium running?

What it means

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.

Source

Thrown at open-computer/services/interface-service/utils/cdp-eval.js:71

      ws.off("message", handler);
      clearTimeout(timeout);
      if (parsed.error) {
        reject(new Error(`CDP error: ${parsed.error.message}`));
      } else {
        resolve(parsed.result);
      }
    }

    ws.on("message", handler);
    ws.send(JSON.stringify(msg));
  });
}

async function main() {
  const versionRaw = await httpGet("http://127.0.0.1:9222/json/version");
  const version = JSON.parse(versionRaw);
  const browserWsUrl = version.webSocketDebuggerUrl;
  if (!browserWsUrl) throw new Error("No webSocketDebuggerUrl — is Chromium running?");

  const ws = await new Promise((resolve, reject) => {
    const socket = new WebSocket(browserWsUrl);
    const t = setTimeout(() => reject(new Error("WS connect timeout")), 5000);
    socket.on("open", () => { clearTimeout(t); resolve(socket); });
    socket.on("error", (err) => { clearTimeout(t); reject(err); });
  });

  try {
    const { targetInfos } = await cdpSend(ws, "Target.getTargets");
    const pages = targetInfos.filter(
      (t) => t.type === "page" && !t.url.startsWith("chrome://") && !t.url.startsWith("devtools://")
    );
    if (pages.length === 0) throw new Error("No browser pages open.");

    let target = pages[pages.length - 1];
    if (targetUrl) {
      const match = pages.find(

View on GitHub (pinned to 526360e320)

Solutions

  1. Relaunch Chromium with --remote-debugging-port=9222 (and --remote-allow-origins=* if connecting cross-origin).
  2. Ensure no other Chrome instance is already bound to 9222.
  3. Verify GET http://127.0.0.1:9222/json/version returns JSON containing webSocketDebuggerUrl before invoking cdp-eval.
  4. Use the open-computer launcher which sets the flags correctly.

Example fix

# before
chromium-browser

# after
chromium-browser --remote-debugging-port=9222 --remote-allow-origins=*
Defensive patterns

Strategy: validation

Validate before calling

// Probe the CDP version endpoint before invoking cdp-eval.
async function cdpReady() {
  try {
    const v = JSON.parse(await httpGet('http://127.0.0.1:9222/json/version'));
    return typeof v.webSocketDebuggerUrl === 'string';
  } catch { return false; }
}

Try / catch

if (!await cdpReady()) {
  console.error('Start Chromium with --remote-debugging-port=9222');
  process.exit(2);
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/17b2790631da45a7. Report an issue: GitHub.