(Created on )

Puppeteer: Missing coordinates

The BiDi geolocation override lacks the coordinate payload expected by its implementation.


The BiDi geolocation override lacks the coordinate payload expected by its implementation.

Error message

Missing coordinates

How this error happens

The internal BiDi geolocation override expects an options object with a coordinates property. An integration that drops that wrapper supplies the wrong shape.

The first block illustrates an internal integration payload. The correction uses an open WebDriver BiDi page named page.

{
    "latitude": 48.8566,
    "longitude": 2.3522
}

How to fix

Use the public geolocation API, which creates the protocol-specific coordinate wrapper.

await page.setGeolocation({
    latitude: 48.8566,
    longitude: 2.3522,
    accuracy: 10,
});

Things to keep in mind

The JSON block is the wrong shape for the internal override, not the public setGeolocation options. Do not pass a coordinates wrapper to the public API; its public arguments are latitude, longitude and accuracy.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →