Chromedriver download returns 404
GraceMelody opened this issue · comments
The orb does not work as expected
- what version of the orb are you currently using?
3.0.0 - paste the
circle.yml
file if possible or at least the relevant portion
install-cypress-and-persist:
executor: cypress/default
steps:
- cypress/install:
package-manager: yarn
install-browsers: true
- persist_to_workspace:
root: ~/
paths:
- .cache/Cypress
- project
- describe what you think should happen
It should not fail when installing chromedriver - describe what happens
TL;DR for the log:
Installed version of Google Chrome is 115.0.5790.98
curl: (22) The requested URL returned error: 404
Exited with code exit status 22
CircleCI received exit code 22
Full CircleCI Log
#!/bin/bash -eo pipefail
#!/bin/bash
if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi
# determine_chrome_version
if uname -a | grep Darwin >/dev/null 2>&1; then
echo "System detected as MacOS"
if [ -f "/usr/local/bin/google-chrome-stable" ]; then
CHROME_VERSION="$(/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --version)"
else
CHROME_VERSION="$(/Applications/Google\ Chrome\ Beta.app/Contents/MacOS/Google\ Chrome\ Beta --version)"
fi
PLATFORM=mac64
elif grep Alpine /etc/issue >/dev/null 2>&1; then
apk update >/dev/null 2>&1 &&
apk add --no-cache chromium-chromedriver >/dev/null
# verify version
echo "$(chromedriver --version) has been installed to $(command -v chromedriver)"
exit 0
else
CHROME_VERSION="$(google-chrome --version)"
PLATFORM=linux64
fi
CHROME_VERSION_STRING="$(echo "$CHROME_VERSION" | sed 's/.*Google Chrome //' | sed 's/.*Chromium //')"
# print Chrome version
echo "Installed version of Google Chrome is $CHROME_VERSION_STRING"
# determine chromedriver release
CHROMEDRIVER_RELEASE="${CHROME_VERSION_STRING%%.*}"
CHROME_RELEASE="${CHROMEDRIVER_RELEASE}"
if [[ $CHROME_RELEASE -lt 70 ]]; then
# https://sites.google.com/a/chromium.org/chromedriver/downloads
# https://chromedriver.storage.googleapis.com/2.40/notes.txt
case $CHROME_RELEASE in
69)
CHROMEDRIVER_VERSION="2.44"
;;
68)
CHROMEDRIVER_VERSION="2.42"
;;
67)
CHROMEDRIVER_VERSION="2.41"
;;
66)
CHROMEDRIVER_VERSION="2.40"
;;
65)
CHROMEDRIVER_VERSION="2.38"
;;
64)
CHROMEDRIVER_VERSION="2.37"
;;
63)
CHROMEDRIVER_VERSION="2.36"
;;
62)
CHROMEDRIVER_VERSION="2.35"
;;
61)
CHROMEDRIVER_VERSION="2.34"
;;
60)
CHROMEDRIVER_VERSION="2.33"
;;
59)
CHROMEDRIVER_VERSION="2.32"
;;
58)
CHROMEDRIVER_VERSION="2.31"
;;
57)
CHROMEDRIVER_VERSION="2.29"
;;
56)
CHROMEDRIVER_VERSION="2.29"
;;
55)
CHROMEDRIVER_VERSION="2.28"
;;
54)
CHROMEDRIVER_VERSION="2.27"
;;
53)
CHROMEDRIVER_VERSION="2.26"
;;
52)
CHROMEDRIVER_VERSION="2.24"
;;
51)
CHROMEDRIVER_VERSION="2.23"
;;
50)
CHROMEDRIVER_VERSION="2.22"
;;
49)
CHROMEDRIVER_VERSION="2.22"
;;
48)
CHROMEDRIVER_VERSION="2.21"
;;
47)
CHROMEDRIVER_VERSION="2.21"
;;
46)
CHROMEDRIVER_VERSION="2.21"
;;
45)
CHROMEDRIVER_VERSION="2.20"
;;
44)
CHROMEDRIVER_VERSION="2.20"
;;
43)
CHROMEDRIVER_VERSION="2.20"
;;
*)
echo "Sorry, Google Chrome/Chromium version 43 or newer is required to use ChromeDriver"
exit 1
;;
esac
else
CHROMEDRIVER_VERSION=$(curl --silent --show-error --location --fail --retry 3 \
"https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEDRIVER_RELEASE")
fi
# installation check
if command -v chromedriver >/dev/null 2>&1; then
if chromedriver --version | grep "$CHROMEDRIVER_VERSION" >/dev/null 2>&1; then
echo "ChromeDriver $CHROMEDRIVER_VERSION is already installed"
exit 0
else
echo "A different version of ChromeDriver is installed ($(chromedriver --version)); removing it"
$SUDO rm -f "$(command -v chromedriver)"
fi
fi
echo "ChromeDriver $CHROMEDRIVER_VERSION will be installed"
# download chromedriver
curl --silent --show-error --location --fail --retry 3 \
--output chromedriver_$PLATFORM.zip \
"http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_$PLATFORM.zip"
# setup chromedriver installation
if command -v yum >/dev/null 2>&1; then
yum install -y unzip >/dev/null 2>&1
fi
unzip "chromedriver_$PLATFORM.zip" >/dev/null 2>&1
rm -rf "chromedriver_$PLATFORM.zip"
$SUDO mv chromedriver "$ORB_PARAM_DRIVER_INSTALL_DIR"
$SUDO chmod +x "$ORB_PARAM_DRIVER_INSTALL_DIR/chromedriver"
# test/verify version
if chromedriver --version | grep "$CHROMEDRIVER_VERSION" >/dev/null 2>&1; then
echo "$(chromedriver --version) has been installed to $(command -v chromedriver)"
readonly base_dir="${CIRCLE_WORKING_DIRECTORY/\~/$HOME}"
rm -f "${base_dir}/LICENSE.chromedriver"
else
echo "Something went wrong; ChromeDriver could not be installed"
exit 1
fi
Installed version of Google Chrome is 115.0.5790.98
curl: (22) The requested URL returned error: 404
Exited with code exit status 22
CircleCI received exit code 22
When doing the install browser
, it fails.
Currently the CURL returns error 404, I assume due to this (the change of JSON API for new releases of Chromedriver)
- I have also noticed this reported on CircleCI-Public/browser-tools-orb#75 and I have seen that CircleCI has pushed a fix since you logged this issue.
I can see that https://app.circleci.com/pipelines/github/cypress-io/circleci-orb/1892/workflows/9d461464-6696-4ca4-a7b2-55bb62efa2c0/jobs/5979 shows this working, testing against 36d09fa. 👍🏻
Will there be a new release now?
See Release v3.1.3.
https://circleci.com/developer/orbs/orb/circleci/browser-tools is now available as 1.4.3
due to other related issues being found and fixed, so I wonder if circleci-orb should be locked to @1.4.2
or rebuilt using @1
to pull in @1.4.3
.
@MikeMcC399 I wasn't seeing the cypress orb pull in the latest when it was set to @1
which is why I manually pegged it to 1.4.2
. It might make sense to use a more broad version in the config if we can verify it is pulling the latest v1.x version of the circleci orb
@MikeMcC399 I wasn't seeing the cypress orb pull in the latest when it was set to
@1
which is why I manually pegged it to1.4.2
. It might make sense to use a more broad version in the config if we can verify it is pulling the latest v1.x version of the circleci orb
Manually pegging to 1.4.2
has fixed the immediate urgent problem. 👍🏻
There is still activity in CircleCI-Public/browser-tools-orb#75, so I would suggest to wait for that to settle down before making any more changes. Your suggestion also makes sense.
Were you able to check if the issue is resolved for you?
FYI - this issue is back after the update to 1.4.4
FYI - this issue is back after the update to
1.4.4
Thanks for the link to
there is also activity in
surrounding this issue. Do you think that there is something that Cypress could do about it?
- I have opened #437 to track this issue, since CircleCI has released a fix and
cypress-io
could now take action. - See CircleCI-Public/browser-tools-orb#90 (comment)