Comments (5)
@lordofthedanse Thanks for reporting that. A better way might be to explicitly list the S3 host in allowed_sites
:
allowed_sites = [
"https://chromedriver.storage.googleapis.com",
"https://github.com/mozilla/geckodriver/releases",
%r{/^https:\/\/github-production-release-asset-.+\.s3\.amazonaws\.com/} # For geckodriver
"https://selenium-release.storage.googleapis.com",
"https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver"
]
If this is too broad (eg: You have other GitHub assets that you want to block), we can restrict the match by adding .+filename=geckodriver
to the Regex above. Let me know if this works and I'll update the wiki.
from webdrivers.
Hi @pnikrat, thanks for this information. I have added it to the wiki - https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock
I have also added a link to the wiki in the README to let the users know it exists now.
from webdrivers.
Hi, I had the same issue with WebMock. The fix was similar:
allowed_sites = [
"https://chromedriver.storage.googleapis.com",
"https://github.com/mozilla/geckodriver/releases",
"https://selenium-release.storage.googleapis.com",
"https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver"
]
WebMock.disable_net_connect!(allow_localhost: true, allow: allowed_sites)
from webdrivers.
I appreciate you guys sharing this information! Updated the wiki page - https://github.com/titusfortner/webdrivers/wiki/Using-with-VCR-or-WebMock
from webdrivers.
@mike1o1 @kapoorlakshya I actually had to use a regex for geckodriver
(a second request was being shot off for a tarball at an s3.AWS site). This is kind of a pain because WebMock (maddeningly) suggests stubbing the request to https://github.com/mozilla/geckodriver/releases
, even after it is whitelisted (because of the second failure).
Unfortunately, the only term that’s shared between the two requests is gecko
(AWS link below):
https://github-production-release-asset-2e65be.s3.amazonaws.com/25354393/2c0dc800-234f-11e9-8b9d-d8a1e36cb2c3?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A/20190430/us-east-1/s3/aws4_request&X-Amz-Date=20190430T132120Z&X-Amz-Expires=300&X-Amz-Signature=2769cf8c4d27aca791398c17e8673b6607312daed49bd9ec367921376dbdc739&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename=geckodriver-v0.24.0-macos.tar.gz&response-content-type=application/octet-stream
so I would recommend amending the Wiki to suggest something like ...
allowed_sites = [
"https://chromedriver.storage.googleapis.com",
%r{/geckodriver/},
"https://selenium-release.storage.googleapis.com",
"https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver”
]
from webdrivers.
Related Issues (20)
- GitHub says latest release is v4.5, but lib/webdrivers/version.rb shows 5.0.0 HOT 1
- msedgedriver wrong version for OS being fetched HOT 6
- How to use `/snap/bin/chromium.chromedriver` instead of foreign arch's chromedriver on arm64 ubuntu? HOT 7
- Is it possible to use an alternative Chromium? HOT 1
- msedgedriver not resolved in Linux HOT 1
- Webdrivers::NetworkError, probably due to new chromedriver naming HOT 6
- Use chromedriver provided by electron for linux/arm64 HOT 4
- Fix chromedriver renaming issue for M1 on Selenium 3.x HOT 2
- Support for chromium-chromedriver on ARM64? HOT 3
- Non-deterministic failures running `chromedriver --version` in Github Actions HOT 4
- Offline environment HOT 3
- Webdrivers trying to load a Chrome version that doesn't exist HOT 81
- way to configure "get latest version even if it doesn't match chrome" ? HOT 1
- Latest Google Webdriver update breaking changes HOT 2
- Cannot find Chrome binary HOT 4
- Solution for VCS and WebMock no longer working HOT 5
- Unable to install the latest version of update selenium-webdriver HOT 1
- Chromedriver LATEST_RELEASE_116 Issue HOT 1
- Incorrect architecture detection on M1 Mac arm64 on Chrome 118.0.5993.117 HOT 1
- Document: upgrade path to selenium manager HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdrivers.