Skip to content

[🐛 Bug]: Webdriver takes long time to load in restricted docker environment #1917

@soumya173

Description

@soumya173

What happened?

I'm using selenium/standalone-chrome:115.0 docker image as base and put my test scripts to execute them inside the container.
Everytime the webdriver is loaded it takes 5 minutes to load. And gives the below error:

Exception trying to discover chromedriver version: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): operation timed out

It is clear that the firewall doesn't allow outside access from the container. The question is why do the webdriver need to query for versions from internet?
The chrome driver and other pre-requisites are already packaged in the docker container. The selenium version is: 4.11.2
Along with this error the test suite runs properly but gets delayed due to this timeout wait.

Is there any way to disable this version check? or reduce the timeout for a workaround?

Command used to start Selenium Grid with Docker

FROM selenium/standalone-chrome:115.0

USER root

RUN apt-get update && apt-get install python3-distutils python3-pip -y
RUN pip install selenium html-testRunner paramiko requests pymongo==3.11.4

ADD config.json /root/config.json
ADD field-mappings.json /root/field-mappings.json
ADD utils.py /root/utils.py
ADD constants.py /root/constants.py
ADD SanityTestMain.py /root/SanityTestMain.py

Relevant log output

Exception trying to discover chromedriver version: error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): operation timed out
Chrome driver loaded successfully

Operating System

Ubuntu 20.04.5 LTS

Docker Selenium version (tag)

selenium/standalone-chrome:115.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions