(Created on )

Puppeteer: Connecting to Firefox using CDP is no longer supported

Firefox is connected with CDP, whose Firefox support was removed.


Firefox is connected with CDP, whose Firefox support was removed.

Error message

Connecting to Firefox using CDP is no longer supported

How this error happens

A Firefox browser endpoint is not a supported CDP connection for Puppeteer. Selecting protocol: "cdp" for that endpoint requests the wrong protocol.

The snippets use the imported puppeteer instance.

await puppeteer.connect({
    browserWSEndpoint: "ws://127.0.0.1:9222/session",
    protocol: "cdp",
});

How to fix

Launch Firefox through Puppeteer with WebDriver BiDi, or connect to its actual BiDi endpoint using that protocol.

const browser = await puppeteer.launch({
    browser: "firefox",
    protocol: "webDriverBiDi",
});

Things to keep in mind

The failing endpoint must belong to Firefox to illustrate this mismatch; the path shown is only a placeholder. Switching protocols does not convert a CDP endpoint into a BiDi endpoint.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →