Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GGR interrupts the session if there are extensions in capabilities #255

Open
azapevalov opened this issue Dec 5, 2018 · 8 comments
Open
Labels

Comments

@azapevalov
Copy link

preconditions: java, selenium, desireCapabilities with extensions

when I create session through RemoteWebDriver, I get error:

org.openqa.selenium.WebDriverException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

there is nothing in grr logs

problem is not observed for guest quota,
only auth connection

@kevinwee0712
Copy link

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.

@vania-pooh
Copy link
Member

@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.

@azapevalov
Copy link
Author

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)

@vania-pooh
Copy link
Member

@azapevalov need HTTP traffic between Ggr and test then.

@abhitrivedi2006
Copy link

@azapevalov were you able to conclude this issue ?

@azapevalov
Copy link
Author

yes and no.
i use guest quota. cheap and dirty workaround but works

@Solyankin
Copy link

The issue is reproduced for me with preconditions from @kevinwee0712

@kevinwee0712
Copy link

kevinwee0712 commented Mar 20, 2020

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:
- ggr-ui
ports:
- "4445:4445"
volumes:
- "/etc/grid-router:/etc/grid-router:ro"
command: ["-quotaDir", "/etc/grid-router/quota", "-listen", ":4445", "-guests-quota", "test", "-guests-allowed"]

@vania-pooh vania-pooh added the bug label Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants