dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
16.9k stars 943 forks source link

[feature] Possibility to use newer ChromeDriver? #1515

Open flammable opened 1 year ago

flammable commented 1 year ago

Version and OS 0.41 via Docker (running on Ubuntu)

Is your feature request related to a problem? Please describe. Hello! I noticed this Reddit thread tonight where a user described their server becoming compromised, possibly due to the recommended ChromeDriver being outdated. The user was not able to provide many details, but it was pointed out that the ChromeDriver Docker image standalone-chrome-debug is about two years old and probably very vulnerable.

Describe the solution you'd like Without knowing how changedetection uses ChromeDriver behind the scenes, would a different, newer image be compatible? For example, this one was published today.

Describe the use-case and give concrete real-world examples I generally try to keep things up to date, but I wanted to check on this first. Is there anything that standalone-chrome-debug does that standalone-chrome wouldn't support?

Additional context For what it's worth, I don't expose ChromeDriver's ports outside of my Docker network, so I think I'm probably safe, but I still wanted to check if using a more recent ChromeDriver would be possible.

Alternatively, I've also implemented Playwright Chromium, so if the Selenium ChromeDriver instructions are no longer recommended or necessary, I'd be happy to update the wiki to steer users in that direction instead. Thanks! πŸ˜„

ammmze commented 1 year ago

I am new here, but I am using selenium/standalone-chrome:109.0. Initially I tried the latest (112.0), but that didn't work. I am pretty it is related to some things chromium changed in later versions (110 iirc) that caused issues with selenium web driver preventing it from starting up a sessions (we ran into it at work where we use selenium with java). I suspect we will need some updates in the changedetection project (code change and/or selenium version bump) to use the most recent ones. But for now v109 is pretty recent.

Now all that being said, I think i'm going to be looking at setting up the playwright stuff as it seems that has more features like screenshots and page interactions.

rursache commented 1 year ago

@ammmze changedetection works great with browserless and the latest chrome driver:

docker run -d \
  --name browserless \
  --restart unless-stopped \
  --shm-size "2g" \
  -p 5556:3000 \
  -e "DEFAULT_LAUNCH_ARGS=[\"--window-size=1920,1080\"]" \
  -e "CONNECTION_TIMEOUT=300000" \
  browserless/chrome:latest
docker run -d \
  --name changedetection.io \
  --restart unless-stopped \
  -p 5555:5000 \
  -e PLAYWRIGHT_DRIVER_URL="ws://IP:5556?stealth=1&--disable-web-security=true" \
  -v /home/USER/.changedetectionio:/datastore \
  dgtlmoon/changedetection.io:latest
ammmze commented 1 year ago

changedetection works great with browserless and the latest chrome driver:

πŸ‘πŸ» Yep, forgot to follow up here...I switched to using playwright and browserless chrome and it works great and gives more capabilities than selenium did.

sammcj commented 1 year ago

With Playwright - are you folks having to run a number of warm chrome instances to get changedetection to not time out though? (they call this "pre_boot").

xconverge commented 11 months ago

as of today I switched from the old/deprecatedimage: selenium/standalone-chrome-debug:3.141.59 to image: selenium/standalone-chrome:115.0 (116+ returned errors)

and it seems to work. I was getting a ton of the timeouts @sammcj referenced above when I tried/switched to playwright 🀷

marceloalencar commented 11 months ago

related to #1783