Closed noraj closed 1 year ago
By reading https://github.com/titusfortner/webdrivers/blob/main/spec/webdrivers/geckodriver_spec.rb, I understand that I could potentially pre-download the binary for offline use and that would not trigger the ConnectionError?
I workarounded it with ruby -e "require 'webdrivers'; Webdrivers::Geckodriver.update"
in my Dockerfile so that the image has a webdriver binary for gecko for offline use.
Hey @noraj, in addition to downloading the driver during Docker build stage, it would also help to pin the version to whatever version is already downloaded. This should do it:
# Set required to currently available version
Webdrivers::Geckodriver.required_version = Webdrivers::Geckodriver. current_version
That will ensure no network calls are attempted to check for or perform an update at run time. Feel free to close this issue if it solves the problem.
Summary
I'm using Watir with webdrivers. When I'm on an environment without internet access I get the following on the client side:
On the server side I can read the following logs:
The app is just doing something like
browser.goto 'http://10.0.0.1:8080'
where of course http://10.0.0.1:8080 is available.But it seems that webdrivers try to check for update on internet and fails if can't contact the upstream URL.
https://github.com/titusfortner/webdrivers#version-pinning
Would that be possible to disable the update or not fails if it can't reach https://github.com/mozilla/geckodriver/releases/latest but just display a warning instead.
Debug Info
Please provide the following information for bug reports: