Closed Joseph-Nathan closed 1 year ago
That's weird. If you can come up with a small reproducible example, I can have a look.
We have a test here: https://github.com/xvrh/puppeteer-dart/blob/master/test/connect_on_web_test.dart to show how to connect to puppeteer from a web page.
Recently we hit a bug with that test: starting from Chrome 111, we cannot make a direct websocket connection from the webpage to the Chrome devtools. The server refuses the connection or something. I had to add a proxy in-between to make the bridge. See the comment in the code.
thanks , i downgrade to Chromium 110 and it work ,
Actually, I just found a solution here: https://groups.google.com/g/chromedriver-users/c/xL5-13_qGaA
We can launch puppeteer with the --remote-allow-origins=*
flag and it works for even in chrome >=111
ie.
var browser = await puppeteer.launch(args: ['--remote-allow-origins=*']);
i have same web app project on Mac and it work fine , i copied the project to Windows machine and the package work fine , but i can't
puppeteer.connect(browserWsEndpoint:ws);
with my web app the function was freeze and no thing happened ,is there any thing to do with environment to solve this .