aerokube / images

Browser images for Selenoid and Moon 1.x
https://aerokube.com/images/latest/
Apache License 2.0
167 stars 125 forks source link

Chromedriver download URL had been changed since from chrome 115 version led to build image fails #665

Open linjin-harvey opened 7 months ago

linjin-harvey commented 7 months ago

COMMAND: ./images chrome -b https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_120.0.6099.216-1_amd64.deb -d 120.0.6099.216 -t selenoid/chrome:120.0

ERROR:

Google Chrome 120.0.6099.216 
Removing intermediate container f8e8f3044bcc
 ---> fc19013f42b1
Successfully built fc19013f42b1
Successfully tagged selenoid/dev_chrome:120.0.6099.216
2024/01/15 17:22:09 downloading driver from https://chromedriver.storage.googleapis.com/120.0.6099.216/chromedriver_linux64.zip
2024/01/15 17:22:09 command error: failed to download chromedriver: download chromedriver: failed to download driver archive: unexpected response code: 404

ROOT CAUSE: Source code still using https://chromedriver.storage.googleapis.com/%s/chromedriver_linux64.zip to download all chromedriver version. image

SOLUTION: Change chromedriver download URL to https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/%s/linux64/chromedriver-linux64.zip if download chromedriver version is >= 115

vania-pooh commented 7 months ago

@linjin-harvey this is actually implemented, but this exact version 120.0.6099.216 is not present in their index file. https://github.com/aerokube/images/blob/master/build/chrome.go#L227

linjin-harvey commented 7 months ago

@vania-pooh The logic in https://github.com/aerokube/images/blob/master/build/chrome.go#L227 is correct, but even I tried existing version in https://[googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json](https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) , like 120.0.6099.109, then the code https://github.com/aerokube/images/blob/master/build/chrome.go#L169 using below URL to download the chromedriver fails: https://chromedriver.storage.googleapis.com/120.0.6099.109/chromedriver_linux64.zip