Skip to content

CDP connection fails with HTTP 404 when using Chrome remote debugging #91

Description

@strange-qwq

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:

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:rolldown-vite@7.2.2
  • boneyard-js version: 1.8.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions