Mintplex-Labs/anything-llm · critical · Error
No webSocketDebuggerUrl — is Chromium running?
Error message
No webSocketDebuggerUrl — is Chromium running?
What it means
Thrown by cdp-input.js (the click/type/key injection utility), structurally identical to cdp-eval's check: GET http://127.0.0.1:9222/json/version returned JSON without webSocketDebuggerUrl. The two utilities share the same launch requirement: Chromium must expose the CDP debugging endpoint on port 9222. Without it, no input can be injected.
Source
Thrown at open-computer/services/interface-service/utils/cdp-input.js:77
ws.on("message", handler);
ws.send(JSON.stringify(msg));
});
}
function sleep(ms) {
return new Promise((r) => setTimeout(r, ms));
}
// Randomized human-like delay between keystrokes
function keystrokeDelay() {
return 30 + Math.floor(Math.random() * 60);
}
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 {
// Find target page
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.");
// Determine target URL filter (always last arg if it doesn't look like a coordinate/text)
let targetUrl = "";View on GitHub (pinned to 526360e320)
Solutions
- Fully quit Chrome, then relaunch with --remote-debugging-port=9222.
- Verify GET http://127.0.0.1:9222/json/version contains webSocketDebuggerUrl.
- Use the open-computer launcher to start Chromium so the flags are applied.
- Ensure no other Chrome instance is holding the profile/port.
Example fix
# before — existing Chrome without debugging # (webSocketDebuggerUrl absent) # after — fresh launch with debugging killall chrome || taskkill /F /IM chrome.exe chromium-browser --remote-debugging-port=9222 --remote-allow-origins=*
Defensive patterns
Strategy: validation
Validate before calling
// Same probe as cdp-eval: confirm webSocketDebuggerUrl before injecting input.
async function cdpInputReady() {
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 cdpInputReady()) {
console.error('Relaunch Chromium with --remote-debugging-port=9222 (quit existing instances first).');
process.exit(2);
} Prevention
- Fully quit existing Chrome instances before relaunching with debugging flags.
- Use the open-computer launcher to start Chromium consistently.
- Verify GET /json/version contains webSocketDebuggerUrl before invoking cdp-input.
When it happens
Trigger: Chromium launched without --remote-debugging-port; another process answering on 9222 with a non-Chromium response; a Chrome variant (e.g. some embedded webviews) that omits webSocketDebuggerUrl from the version JSON.
Common situations: User switched to a system Chrome that was already running without debugging flags (Chrome refuses to enable debugging on an existing instance); Chrome was started by a desktop shortcut without the flag; the open-computer launcher was bypassed.
Related errors
- No webSocketDebuggerUrl — is Chromium running?
- No browser pages open.
- No browser tab matching "${targetUrl}". Open tabs: ${openTab
- QEMU directory not found: ${dir} Contents of ${parent}: ${co
- No browser pages open.
AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13).
Data as JSON: /api/errors/3ed04a3474d686bb.
Report an issue: GitHub.