smkent / safeway-coupons

🥫 🎫 Automatic coupon clipper for Safeway's online "Safeway for U" coupons
GNU General Public License v3.0
57 stars 17 forks source link

browser version not matching chromedriver #109

Closed borgified closed 8 months ago

borgified commented 8 months ago
safeway-coupons-safeway-coupons_test-1    | from session not created: This version of ChromeDriver only supports Chrome version 121
safeway-coupons-safeway-coupons_test-1    | Current browser version is 120.0.6099.109

because of this mismatch i couldnt get it to run. i tried using ghcr.io/smkent/safeway-coupons:latest, 0.2.9 and 0.2.8 with similar mismatching results.

i think this is because the webdriver-manager is not 4.0.1. after i made this change and rebuilt the container, i was able to make it log into the site:

$ git diff
diff --git a/pyproject.toml b/pyproject.toml
index 16d307b..9fce79b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -22,7 +22,7 @@ python = "^3.8"
 dataclasses-json = "*"
 requests = "*"
 selenium = "^4.10"
-webdriver-manager = "^3.8.6"
+webdriver-manager = "^4.0.1"
 undetected-chromedriver = "^3.5.0"

im not familiar with webdriver-manager so im not sure if this is the right solution, if it is, im happy to create a PR if it helps.

smkent commented 8 months ago

I'm seeing this too and I've been confused by similar issues in the past, which have been resolved by rebuilding the container.

I found this which explains that undetected-chromedriver (oddly) downloads the driver at runtime. Apparently it's possible to pin the Chrome version in code, so I'll look at doing that dynamically based on the version downloaded at container build time. I wonder if there's a way to pre-download and/or permanently cache the driver as well.

smkent commented 8 months ago

https://github.com/smkent/safeway-coupons/pull/110 should resolve this.

smkent commented 8 months ago

v0.2.11 is released with that change. Give it a try and let me know if it works!

borgified commented 8 months ago

works great now thank you so much