Playwright not working on docker

This issue has been tracked since 2022-12-14.

Describe the bug
Hey guys, sorry if this has been reported before, but I'm trying to connect playwright with browserless while using ws://browserless/playwright on docker container, but it isn't working. It works for content, function endpoints, but not for playwright (want to switch to playwright). So is it possible to use connect to playwright on docker container?

p.s. I have PREBOOT_CHROME set to true on docker. If that makes a difference. I think I saw an issue stating that it might. Thanks in advance

Desktop (please complete the following information):

  • Browser latest docker
  • Playwright version: 1.24.0
  • Python version: 3.10.8
andyMrtnzP wrote this answer on 2022-12-15

Prebooting will spawn browsers using default args, and by default those browsers won't start a Playwright server, so they're always expecting Puppeteer/Chrome DP connections.

Can you use browserType.connectOverCDP and connect at ws://localhost:3000?

Umzario wrote this answer on 2022-12-17

Prebooting will spawn browsers using default args, and by default those browsers won't start a Playwright server, so they're always expecting Puppeteer/Chrome DP connections.

Can you use browserType.connectOverCDP and connect at ws://localhost:3000?

Thanks for the quick response. I got no luck with that. I kept getting this error Protocol error (Browser.getVersion): undefined

I also updated the playwright version to 1.28.0 to see if it'll work

andyMrtnzP wrote this answer on 2022-12-17

Sorry, pre-booting doesn't work with Playwright. You'll need to disable it and open Playwright sessions on demand

Umzario wrote this answer on 2022-12-17

Thanks for the help. I made a silly mistake by using ws://localhost:3000/playwright. I changed it to ws://localhost:3000 and it works perfectly!

More Details About Repo
Owner Name browserless
Repo Name chrome
Full Name browserless/chrome
Language TypeScript
Created Date 2017-11-17
Updated Date 2023-03-22
Star Count 5309
Watcher Count 47
Fork Count 516
Issue Count 29

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date