(Created on )

Puppeteer: Failed to remove page binding with name {value}: window['{value}'] does not exists!

removeExposedFunction receives a name not registered on this page.


removeExposedFunction receives a name not registered on this page.

Error message

Failed to remove page binding with name {value}: window['{value}'] does not exists!

{value} is replaced by the value shown in your error message.

How this error happens

Removing an unregistered exposed binding leaves the browser-side cleanup with no known function to remove.

The snippets use an open Chrome/CDP page named page.

await page.removeExposedFunction(
    "notRegistered"
);

How to fix

Remove only bindings that your setup successfully registered, and do so once.

await page.exposeFunction(
    "readSettings",
    () => {
        return {
            theme: "dark",
        };
    }
);

await page.removeExposedFunction(
    "readSettings"
);

Things to keep in mind

The public API may reject earlier with “Function with name … does not exist.” If this browser-side removal error appears after successful registration, isolate navigation and competing cleanup handlers.

All Puppeteer errors

Keep Reading

Puppeteer Guides

All Guides →