Open azapevalov opened 5 years ago
Encounter exactly the same issue, without ggr, selenoid grid itself works fine.
Sample code:
//Create capabilities
Map<String, Object> capabilities = new HashMap<>();
//Create chrome options and add extension
ChromeOptions chromeOptions = new ChromeOptions();
final File tempFile = File.createTempFile("extension", ".crx");
tempFile.deleteOnExit();
FileOutputStream out = new FileOutputStream(tempFile);
IOUtils.copy(this.getClass().getClassLoader().getResourceAsStream("extension.crx"), out);
chromeOptions.addExtensions(tempFile);
capabilities.put(ChromeOptions.CAPABILITY, chromeOptions);
//Add capabilities to desired capability
new DesiredCapabilities(capabilities)
new RemoteWebDriver("http://test:test@ggr:4445/wd/hub/", capabilities);
Exception we met: 1) Error in custom provider, org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
@azapevalov Ggr proxies all requests and interrupts the request if requested browser is not found. Authentication is always extracted from respective HTTP header. So don't get the issue.
I can not understand where browsers. There is a clear relationship between the presence or absence of authentication in GGR for the same quota file and the entire system outside the GGR(selenoid with browsers.json)
@azapevalov need HTTP traffic between Ggr and test then.
@azapevalov were you able to conclude this issue ?
yes and no. i use guest quota. cheap and dirty workaround but works
The issue is reproduced for me with preconditions from @kevinwee0712
The issue is reproduced for me with preconditions from @kevinwee0712
Try to use -guests-allowed to bypass it and then your addon could work again. Also try to login as guest, like http://ggr_host:4445/wd/hub. Don't use http://user_name@ggr_host:4445/wd/hub.
Following is my ggr service part in docker compose file. ggr: restart: always image: aerokube/ggr:1.6.6 network_mode: bridge links:
preconditions: java, selenium, desireCapabilities with extensions
when I create session through RemoteWebDriver, I get error:
there is nothing in grr logs
problem is not observed for guest quota, only auth connection