CDP connection fails with HTTP 404 when using Chrome remote debugging

Author: strange-qwqCreated May 21, 2026Updated Aug 31, 2026

After enabling remote debugging in Chrome (chrome://inspect/#remote-debugging and toggling “Allow remote debugging for this browser instance”), and configuring vite.config.ts with:

typescript
boneyardPlugin({
    cdp: 9222,
    framework: "react",
})

Running the project and visiting any page throws an error in the console:

[boneyard] ✗  capture failed: browserType.connectOverCDP: Unexpected status 404 when connecting to http://localhost:9222/json/version/.
This does not look like a DevTools server, try connecting via ws://.
Call log:
  - <ws preparing> retrieving websocket url from http://localhost:9222

According to Chrome blog, only ws:// protocol appears to work. Suggest boneyard support connecting via WebSocket endpoint or fix the CDP connection logic.

Version info:

  • OS: macOS 26.5 (25F71)
  • Chrome: 150.0.7838.0 (dev) (arm64)
  • Framework: Vite + React
  • Vite version: npm:[email protected]
  • boneyard-js version: 1.8.1