(Created on )

Puppeteer: Not available in WebDriver BiDi

A CDP-specific JSHandle remote-object operation is unavailable in BiDi.


A CDP-specific JSHandle remote-object operation is unavailable in BiDi.

Error message

Not available in WebDriver BiDi

How this error happens

remoteObject exposes a CDP representation. A BiDi JSHandle does not provide that CDP-only representation.

The snippets use a WebDriver BiDi page named page.

const handle = await page.evaluateHandle(() => {
    return {
        count: 3,
    };
});

handle.remoteObject();

How to fix

Use public value extraction or handle evaluation rather than a CDP-specific remote-object shape.

const handle = await page.evaluateHandle(() => {
    return {
        count: 3,
    };
});

try {
    const count = await handle.evaluate(
        (value) => value.count
    );

    console.log(count);
} finally {
    await handle.dispose();
}

Things to keep in mind

If you genuinely need CDP object IDs, use a CDP browser connection. A BiDi reference is not a CDP object ID.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →