apify / apify-actor-docker

Base Docker images for Apify actors.
https://hub.docker.com/u/apify
Apache License 2.0
70 stars 22 forks source link

Fix Chromedriver compatibility issue in Python-Selenium #113

Closed vdusek closed 1 year ago

vdusek commented 1 year ago

We are facing compatibility issues in the Python-Selenium Dockerfile. The root cause appears to be a breaking change in how Google publishes Chromedriver versions. The issue is outlined in this Google Groups thread.

Previously, Chromedriver's latest version was available at https://chromedriver.storage.googleapis.com/LATEST_RELEASE, but Google has made changes, leaving an outdated version published at that URL. Consequently, when installing the latest Chrome in our Dockerfile, an older version of Chromedriver is installed, causing compatibility problems.

To address this, we need to update our Dockerfile to download Chromedriver using an alternative method. This likely involves downloading a specific file, parsing it with jq, and extracting the correct URL.

The issue is specifically impacting Python tests in our Actor Docker image, leading to test failures for all Python versions, as noted in this pull request. The goal is to modify the Dockerfile to ensure compatibility between the installed Chrome and Chromedriver versions.

vdusek commented 1 year ago

There are no new versions of Chrome driver published at https://chromedriver.storage.googleapis.com/.

We will have to use another source, this should be official, https://googlechromelabs.github.io/chrome-for-testing/#stable.

Also, check https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints for the latest stable version.