aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.57k stars 322 forks source link

An issue with MS Edge: Unable to start a WebDriver session - Host header or origin header is specified and is not whitelisted or localhost #1241

Closed roma3784 closed 2 years ago

roma3784 commented 2 years ago

I've been having an issue with MS Edge. I'm trying to run tests on virtual desktop against Edge using selenoid. Jenkins errors: "E/runner - Unable to start a WebDriver session." "I/runnerCli - Host header or origin header is specified and is not whitelisted or localhost."

in cmd selenoid.bat error- "Passthrough is not supported, GL is disabled, ANGLE is" Browsers open , but nothing else happens -> can see 'data' shown, but tests don't run.

What I've tried to do to fix it up:

  1. Checked 'Use hardware acceleration when available', enabled 'WebGL' and 'Override software rendering list' it didn't help, browsers that run using 'selenoid' don't have these settings on.
  2. Used a lot of flags inside browsers.json - e.g. - "image": ["C:\selenoid\msedgedriver.exe", "--disable-gpu", "--whitelisted-ips=''", "--verbose", "--allowed-origins=*", "--disable-software-rasterizer"], used them separately as well as together. Certainly, browserName and version in browser.json is alright.
  3. Tried to use different Edge versions as well.

In order to run tests against Edge locally, I'm using 'webdriver-manager start --edge ..path/msedgedriver.exe' to run 'Selenium Server ' after that everything works fine locally -> I don't know if it helps, I tried to use the way like this on Jenkins instance where containers with 'ggr' ,'ggr-ui' ,'selenoid' are, but it didn't help.

Using Protractor, Windows 10.

Any ideas what I missed? Thank you!

vania-pooh commented 2 years ago

@roma3784 allowed-origins should normally fix it.

roma3784 commented 2 years ago

Hello! @vania-pooh, allowed-origins doesn't help unfortunately, here's my browser.json -

{ "MicrosoftEdge": { "default": "103.0", "versions": { "103.0": { "image": ["C:\selenoid\msedgedriver.exe", "--allowed-origins=*"] } } } }

Maybe there's another way to write it down

Here's the screenshot image

vania-pooh commented 2 years ago

@roma3784 probably trying to build selenoid binary from latest source code will help.

roma3784 commented 2 years ago

@vania-pooh thank you so much, that helped!

vania-pooh commented 2 years ago

Closing then.