(Created on )

Puppeteer: allowAndName is not supported in WebDriver BiDi

WebDriver BiDi rejects the allowAndName download policy.


WebDriver BiDi rejects the allowAndName download policy.

Error message

allowAndName is not supported in WebDriver BiDi

How this error happens

The allowAndName download policy uses GUID-based naming. Puppeteer’s BiDi implementation does not implement that policy.

The snippets use a WebDriver BiDi browser named browser.

await browser.createBrowserContext({
    downloadBehavior: {
        policy: "allowAndName",
        downloadPath: "/absolute/path/downloads",
    },
});

How to fix

Use allow with an explicit download directory if normal browser filenames suit the task.

const context = await browser.createBrowserContext({
    downloadBehavior: {
        policy: "allow",
        downloadPath: "/absolute/path/downloads",
    },
});

Things to keep in mind

This changes filename behavior. Use Chrome/CDP if GUID-based naming is required. Setting a download policy does not wait for download completion.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →