(Created on )

Puppeteer: Origin (*) is not supported by WebDriver BiDi

BiDi permissions reject the wildcard origin * in this implementation.


BiDi permissions reject the wildcard origin * in this implementation.

Error message

Origin (*) is not supported by WebDriver BiDi

How this error happens

BiDi’s setPermission implementation requires a specific origin. The wildcard * is rejected before the permission command is sent.

The snippets use a WebDriver BiDi browser named browser.

await browser.defaultBrowserContext().setPermission(
    "*",
    {
        permission: {
            name: "geolocation",
        },
        state: "granted",
    }
);

How to fix

Set the permission for the exact origin your test uses.

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

Things to keep in mind

A single-origin grant is narrower than a wildcard grant. If multiple origins need access, handle them explicitly.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →