Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Default URL for Chromedriver seems incorrect #1909

Closed
amardeep2006 opened this issue Aug 2, 2023 · 3 comments
Closed

[🐛 Bug]: Default URL for Chromedriver seems incorrect #1909

amardeep2006 opened this issue Aug 2, 2023 · 3 comments

Comments

@amardeep2006
Copy link
Contributor

What happened?

I looked at the NodeChrome Dockerfile and URL seems to be pointing to Chrome Zip instead on ChromeDriver zip.

then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chrome-linux64.zip ; \

Existing URL : https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/linux64/chrome-linux64.zip

Expected URL : https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/linux64/chromedriver-linux64.zip

Command used to start Selenium Grid with Docker

docker build --progress=plain --build-arg="CHROME_VERSION=google-chrome-stable"  --build-arg="CHROME_DRIVER_VERSION=115.0.5790.102" --build-arg="NAMESPACE=selgrid" --build-arg="VERSION=4.10" --build-arg="AUTHORS=Amar" -t selgrid/node-chrome:4.10 .

Relevant log output

> [5/6] RUN if [ ! -z "115.0.5790.102" ];   then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.102/linux64/chrome-linux64.zip ;   else echo "Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json"     && CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json     && CFT_CHANNEL="Stable"     && if [[ google-chrome-stable == *"beta"* ]]; then CFT_CHANNEL="Beta"; fi     && if [[ google-chrome-stable == *"unstable"* ]]; then CFT_CHANNEL="Dev"; 
fi     && CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL "$CFT_CHANNEL" '.channels[] | select (.channel==$CFT_CHANNEL)')     && CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' )     && CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform=="linux64") | .url' ) ;   fi   && echo "Using ChromeDriver from: "$CHROME_DRIVER_URL   && echo "Using ChromeDriver version: "115.0.5790.102   && wget --no-verbose -O /tmp/chromedriver_linux64.zip $CHROME_DRIVER_URL   && rm -rf /opt/selenium/chromedriver   && sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium   && rm /tmp/chromedriver_linux64.zip   && sudo mv /opt/selenium/chromedriver-linux64/chromedriver /opt/selenium/chromedriver-115.0.5790.102   && sudo chmod 755 /opt/selenium/chromedriver-115.0.5790.102   && sudo ln -fs /opt/selenium/chromedriver-115.0.5790.102 /usr/bin/chromedriver:
109.9   inflating: /opt/selenium/chrome-linux64/locales/fr.pak
109.9   inflating: /opt/selenium/chrome-linux64/locales/gu.pak.info
109.9   inflating: /opt/selenium/chrome-linux64/locales/ru.pak
109.9   inflating: /opt/selenium/chrome-linux64/locales/ro.pak.info
109.9   inflating: /opt/selenium/chrome-linux64/locales/hr.pak.info
109.9    creating: /opt/selenium/chrome-linux64/resources/
109.9    creating: /opt/selenium/chrome-linux64/resources/inspector_overlay/
109.9   inflating: /opt/selenium/chrome-linux64/resources/inspector_overlay/inspector_overlay_resources.grd
109.9   inflating: /opt/selenium/chrome-linux64/resources/inspector_overlay/main.js
110.0 mv: cannot stat '/opt/selenium/chromedriver-linux64/chromedriver': No such file or directory
------
Dockerfile:43
--------------------
  42 |     ARG CHROME_DRIVER_VERSION
  43 | >>> RUN if [ ! -z "$CHROME_DRIVER_VERSION" ]; \
  44 | >>>   then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chrome-linux64.zip ; \
  45 | >>>   else echo "Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json" \
  46 | >>>     && CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json \
  47 | >>>     && CFT_CHANNEL="Stable" \
  48 | >>>     && if [[ $CHROME_VERSION == *"beta"* ]]; then CFT_CHANNEL="Beta"; fi \
  49 | >>>     && if [[ $CHROME_VERSION == *"unstable"* ]]; then CFT_CHANNEL="Dev"; fi \
  50 | >>>     && CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL "$CFT_CHANNEL" '.channels[] | select (.channel==$CFT_CHANNEL)') \
  51 | >>>     && CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' ) \
  52 | >>>     && CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform=="linux64") | 
.url' ) ; \
  53 | >>>   fi \
  54 | >>>   && echo "Using ChromeDriver from: "$CHROME_DRIVER_URL \
  55 | >>>   && echo "Using ChromeDriver version: "$CHROME_DRIVER_VERSION \
  56 | >>>   && wget --no-verbose -O /tmp/chromedriver_linux64.zip $CHROME_DRIVER_URL \
  57 | >>>   && rm -rf /opt/selenium/chromedriver \
  58 | >>>   && sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
  59 | >>>   && rm /tmp/chromedriver_linux64.zip \
  60 | >>>   && sudo mv /opt/selenium/chromedriver-linux64/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \  61 | >>>   && sudo chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
  62 | >>>   && sudo ln -fs /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver
  63 |
--------------------
ERROR: failed to solve: process "/bin/sh -c if [ ! -z \"$CHROME_DRIVER_VERSION\" ];   then CHROME_DRIVER_URL=https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$CHROME_DRIVER_VERSION/linux64/chrome-linux64.zip ;   else echo \"Geting ChromeDriver binary from https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json\"  
   && CFT_URL=https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json     && CFT_CHANNEL=\"Stable\"     && if [[ $CHROME_VERSION == *\"beta\"* ]]; then CFT_CHANNEL=\"Beta\"; fi     && if [[ $CHROME_VERSION == *\"unstable\"* ]]; then CFT_CHANNEL=\"Dev\"; fi     && CTF_VALUES=$(curl -sSL $CFT_URL | jq -r --arg CFT_CHANNEL \"$CFT_CHANNEL\" '.channels[] | select (.channel==$CFT_CHANNEL)')     && CHROME_DRIVER_VERSION=$(echo $CTF_VALUES | jq -r '.version' )     && CHROME_DRIVER_URL=$(echo $CTF_VALUES | jq -r '.downloads.chromedriver[] | select(.platform==\"linux64\") | .url' ) ;   fi   && echo \"Using ChromeDriver from: \"$CHROME_DRIVER_URL   && echo \"Using ChromeDriver version: \"$CHROME_DRIVER_VERSION   && wget --no-verbose -O /tmp/chromedriver_linux64.zip $CHROME_DRIVER_URL   && rm -rf /opt/selenium/chromedriver   && sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium   && rm /tmp/chromedriver_linux64.zip   && sudo mv /opt/selenium/chromedriver-linux64/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION   && sudo chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION   && sudo ln -fs /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver" did not complete successfully: exit code: 1

Operating System

Windows 10

Docker Selenium version (tag)

4.10

@github-actions
Copy link

github-actions bot commented Aug 2, 2023

@amardeep2006, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol diemol closed this as completed in 5427fef Aug 2, 2023
@diemol
Copy link
Member

diemol commented Aug 2, 2023

Good catch! Thank you, fixed in the linked commit.

Copy link

github-actions bot commented Dec 9, 2023

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants