Playwright Driver setup on Docker/Nas #627
Replies: 7 comments 5 replies
-
I got it working by putting both containers on the same custom bridge network. I think is sometimes (or always?) required for two containers to be able to communicate with each other, depending on the environment. This is the container that I used: https://hub.docker.com/r/browserless/chrome/ I am not using Synology, but it supports custom networks and their docs suggest that it's required for container name resolution to work. https://kb.synology.com/en-my/DSM/help/Docker/docker_network?version=7 |
Beta Was this translation helpful? Give feedback.
-
Interesting, I get a little further using browserless-chrome , however it appears to have trouble
https://registry.hub.docker.com/r/playwright/chrome/ It does however tell me that what I am doing is correct, with regards to container linkages, as using browserless-chrome, I can get a connection to the web driver, and clearly there is something wrong with the docker image I was using... Problem is, there are so many Playwright docker images, which should I be using??? |
Beta Was this translation helpful? Give feedback.
-
Thanks, those two steps got me up and running.. I did notice quite a few of my watches started coming up with "Got HTML content but no text found." after updating and/or switching fetcher. Cloning and deleting the original fixed it. |
Beta Was this translation helpful? Give feedback.
-
Shit, some problems like @fourofspades :-( Example: Using browserless-chrome 1.54 stable and if I enter the FETCH URL I will see a webpage with Buttons like "Search, Scrape, PDF, Screenshot" and so on.. Is this correct? |
Beta Was this translation helpful? Give feedback.
-
Things are working for me, however it does seem rather fragile, and works and breaks depending on docker image, and even between versions of the same docker image. I'm using: Both containers are connected to the synology bridge network, and also a new network I created called changedetect. On the browserless-chrome container, I mapped port 3000 On the changedetection container, I set the PLAYWRIGHT_DRIVER_URL to ws://browserless-chrome1:3000 Hope that helps. |
Beta Was this translation helpful? Give feedback.
-
Try this (replace your URL). Works for me on a Synology NAS.
Note that the wiki says |
Beta Was this translation helpful? Give feedback.
-
https://github.com/dgtlmoon/changedetection.io/wiki/Synology-NAS-setup |
Beta Was this translation helpful? Give feedback.
-
Never had any issues running the Selium webdriver, however really struggling to get the new driver working. The documentation seems more sparse.
The error I constantly get is:
WebSocket error: connect ECONNREFUSED 172.17.0.2:3000 =========================== logs =========================== <ws connecting> ws://playwright-chrome1:3000 <ws error> [object Object] <ws connect error> ws://playwright-chrome1:3000 connect ECONNREFUSED 172.17.0.2:3000 <ws disconnected> ws://playwright-chrome1:3000 code=1006 reason= ============================================================
I am using Synology NAS, and have my Playwright docker instance linked to my changedetection. I have also mapped port 3000 on the playwriight container.
Docker Setup:
Beta Was this translation helpful? Give feedback.
All reactions