(Created on )

Puppeteer: panTiltZoom is not supported by WebDriver BiDi

BiDi does not implement the panTiltZoom permission descriptor.


BiDi does not implement the panTiltZoom permission descriptor.

Error message

panTiltZoom is not supported by WebDriver BiDi

How this error happens

The WebDriver BiDi permission implementation rejects the panTiltZoom descriptor flag. A supported permission name does not make every descriptor extension available.

The snippets use a WebDriver BiDi browser named browser.

await browser.defaultBrowserContext().setPermission(
    "https://example.com",
    {
        permission: {
            name: "camera",
            panTiltZoom: true,
        },
        state: "granted",
    }
);

How to fix

Use Chrome/CDP when the descriptor flag is essential. The following keeps the requested flag instead of silently weakening the permission.

const cdpBrowser = await puppeteer.launch({
    browser: "chrome",
    protocol: "cdp",
});

try {
    await cdpBrowser.defaultBrowserContext().setPermission(
        "https://example.com",
        {
            permission: {
                name: "camera",
                panTiltZoom: true,
            },
            state: "granted",
        }
    );
} finally {
    await cdpBrowser.close();
}

Things to keep in mind

The correction uses an imported puppeteer instance and installed Chrome. Hardware availability and browser permission support still matter. If you only need the ordinary permission, omit the unsupported flag after checking that this changes no requirement.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →