Puppeteer: blocklist and allowlist are only supported with the CDP protocol
Browser allowlist/blocklist options are requested outside CDP.
Browser allowlist/blocklist options are requested outside CDP.
Error message
blocklist and allowlist are only supported with the CDP protocol
How this error happens
URL allowlists and blocklists in these connection options are CDP features. Requesting them with WebDriver BiDi is rejected.
The snippets use the imported puppeteer instance.
await puppeteer.connect({
browserWSEndpoint: "ws://127.0.0.1:9222/session",
protocol: "webDriverBiDi",
blocklist: [
"https://blocked.example/*",
],
});
How to fix
Use Chrome/CDP when these URL restrictions are part of your task. Keep the restrictions in the corrected connection.
const browser = await puppeteer.connect({
browserURL: "http://127.0.0.1:9222",
protocol: "cdp",
blocklist: [
"https://blocked.example/*",
],
});
Things to keep in mind
The correction needs an actual Chrome/CDP endpoint, not the BiDi endpoint from the failing workflow. These options are not a replacement for operating-system or network egress controls.