Skip to content

Instantly share code, notes, and snippets.

@theredfish
Last active August 21, 2019 07:49
Show Gist options
  • Save theredfish/23c1cfebde99ec1d9827184b1fe47495 to your computer and use it in GitHub Desktop.
Save theredfish/23c1cfebde99ec1d9827184b1fe47495 to your computer and use it in GitHub Desktop.
A reproductible EPROTO error with selenium-webdriver in javascript
version: '2'
services:
nginx:
build: .
restart: always
ports:
- 80:80
FROM nginx:alpine
COPY nginx.conf /etc/nginx/nginx.conf
const webdriver = require("selenium-webdriver");
let driver = new webdriver.Builder()
.forBrowser("firefox")
.usingServer("https://a-real-selenium-grid/wd/hub")
.usingWebDriverProxy("http://localhost:80")
.build();
driver.quit();
worker_processes 1;
events { worker_connections 1024; }
http {
sendfile on;
server {
listen 80;
server_name localhost;
location / {
proxy_pass https://a-real-selenium-grid;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment