From wrangler: 4.16.0 onwards, @cloudflare/puppeteer .connect API does not work on a worker

Error occurs on the line -
this.browser = await puppeteer.connect({ browserWSEndpoint: wsEndpoint });
this.browser = await puppeteer.connect({ browserWSEndpoint: wsEndpoint });
✘ [ERROR] Error: ws does not work in the browser. Browser clients must use the native WebSocket object Any workaround?
1 Reply
Suman!
Suman!OP•6mo ago
I am still having this issue in the latest wrangler - 4.19.1. Appreciate any help here šŸ™‚

Did you find this page helpful?