openclaw/openclaw · error

CDP /json/version missing webSocketDebuggerUrl

Error message

CDP /json/version missing webSocketDebuggerUrl

What it means

Error "CDP /json/version missing webSocketDebuggerUrl" thrown in openclaw/openclaw.

Source

Thrown at extensions/browser/src/browser/cdp.ts:264

        cdpControlPolicy,
      );
    } catch (err) {
      // Discovery failed for an HTTP/HTTPS URL — propagate immediately.
      if (!isWebSocketUrl(opts.cdpUrl)) {
        throw err;
      }
      // For bare ws/wss URLs, fall through: /json/version is unavailable
      // so we attempt to use opts.cdpUrl as a direct WS endpoint below.
    }
    const wsUrlRaw = version?.webSocketDebuggerUrl?.trim() ?? "";
    if (wsUrlRaw) {
      wsUrl = normalizeCdpWsUrl(wsUrlRaw, discoveryUrl);
    } else if (isWebSocketUrl(opts.cdpUrl)) {
      // /json/version unavailable or returned no WebSocket URL. Treat the
      // original URL as a direct WebSocket endpoint.
      wsUrl = opts.cdpUrl;
    } else {
      throw new Error("CDP /json/version missing webSocketDebuggerUrl");
    }
  }

  const candidateWsUrls =
    isWebSocketUrl(opts.cdpUrl) && wsUrl !== opts.cdpUrl ? [wsUrl, opts.cdpUrl] : [wsUrl];
  let lastError: unknown;
  for (const candidateWsUrl of candidateWsUrls) {
    try {
      const endpointSource =
        candidateWsUrl === opts.cdpUrl
          ? ({ source: "configured" } as const)
          : ({ source: "discovered", configuredUrl: opts.cdpUrl } as const);
      await assertCdpEndpointAllowed(candidateWsUrl, cdpControlPolicy, endpointSource);
      opts.signal?.throwIfAborted();
      return await withCdpSocket(
        candidateWsUrl,
        async (send) => {
          opts.signal?.throwIfAborted();

View on GitHub (pinned to 01804a7531)

When it happens

Trigger: Thrown at extensions/browser/src/browser/cdp.ts:264 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openclaw/openclaw@01804a7531 (2026-08-12). Data as JSON: /api/errors/8b8db558d9ac909c. Report an issue: GitHub.