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

Unable to set enablePassThrough to false in docker selenium 3.8.1 using SE_OPTS #647

Closed
sahil1610 opened this issue Jan 5, 2018 · 7 comments

Comments

@sahil1610
Copy link

Meta -

Image(s):

Docker-Selenium Image Version(s): 3.8.1 lates

Docker Version:

17.09.0-ce

OS:

MAC

Expected Behavior - SE_OPTS should set enablePassThrough to false

Actual Behavior - SE_OPTS not being honored

##LOGS:
appending selenium options: -enablePassThrough false
13:06:33.560 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b'
13:06:33.561 INFO - Launching a Selenium Grid node
2018-01-05 13:06:33.898:INFO::main: Logging initialized @714ms to org.seleniumhq.jetty9.util.log.StdErrLog
13:06:33.931 INFO - Using new FirefoxOptions() is preferred to DesiredCapabilities.firefox()
13:06:33.944 INFO - Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
13:06:33.948 INFO - Using new EdgeOptions() is preferred to DesiredCapabilities.edge()
13:06:33.949 INFO - Driver class not found: com.opera.core.systems.OperaDriver
13:06:33.949 INFO - Using new OperaOptions() is preferred to DesiredCapabilities.operaBlink()
13:06:33.950 INFO - Using new SafariOptions() is preferred to DesiredCapabilities.safari()
13:06:33.951 INFO - Driver class not found: org.openqa.selenium.phantomjs.PhantomJSDriver
13:06:33.963 INFO - Driver provider class org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:
registration capabilities Capabilities {browserName: internet explorer, ensureCleanSession: true, platform: WINDOWS, version: } does not match the current platform LINUX
13:06:33.964 INFO - Driver provider class org.openqa.selenium.edge.EdgeDriver registration is skipped:
registration capabilities Capabilities {browserName: MicrosoftEdge, platform: WINDOWS, version: } does not match the current platform LINUX
13:06:33.964 INFO - Driver provider class org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities {browserName: safari, platform: MAC, version: } does not match the current platform LINUX
13:06:34.001 INFO - Using new ChromeOptions() is preferred to DesiredCapabilities.chrome()
13:06:34.002 INFO - Using new EdgeOptions() is preferred to DesiredCapabilities.edge()
13:06:34.003 INFO - Using new FirefoxOptions() is preferred to DesiredCapabilities.firefox()
13:06:34.003 INFO - Using new OperaOptions() is preferred to DesiredCapabilities.operaBlink()
13:06:34.004 INFO - Using new SafariOptions() is preferred to DesiredCapabilities.safari()
13:06:34.015 INFO - Using the passthrough mode handler
2018-01-05 13:06:34.045:INFO:osjs.Server:main: jetty-9.4.7.v20170914
2018-01-05 13:06:34.073:WARN:osjs.SecurityHandler:main: [email protected]@3c0be339{/,null,STARTING} has uncovered http methods for path: /
2018-01-05 13:06:34.077:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@3c0be339{/,null,AVAILABLE}
2018-01-05 13:06:34.088:INFO:osjs.AbstractConnector:main: Started ServerConnector@3943a2be{HTTP/1.1,[http/1.1]}{0.0.0.0:5555}
2018-01-05 13:06:34.089:INFO:osjs.Server:main: Started @905ms
13:06:34.089 INFO - Selenium Grid node is up and ready to register to the hub
13:06:34.099 INFO - Starting auto registration thread. Will try to register every 5000 ms.
13:06:34.099 INFO - Registering the node to the hub: http://progrid:4444/grid/register
13:06:34.121 INFO - The node is registered to the hub and ready to use

@diemol
Copy link
Member

diemol commented Jan 5, 2018

Hi @sahil1610,

Can you share with us the docker command you are using to start the container?

I can actually see in the log you posted that the parameter is being received:

appending selenium options: -enablePassThrough false

Why do say that it was not set?

@sahil1610
Copy link
Author

I am passing these through docker compose:

environment:
- no_proxy=localhost
- TZ=Europe/London
- HUB_PORT_4444_TCP_ADDR=progrid
- HUB_PORT_4444_TCP_PORT=4444
- SE_OPTS=-enablePassThrough false

And when I check this on hub console, enablePassThrough is still true.

@sahil1610
Copy link
Author

@diemol any help on this?

@diemol
Copy link
Member

diemol commented Jan 8, 2018

Hi @sahil1610,

I tried with this docker-compose file:

# To execute this docker-compose yml file use docker-compose -f <file_name> up
# Add the "-d" flag at the end for deattached execution
version: '2'
services:
  firefox:
    image: selenium/node-firefox:3.8.1-dubnium
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - no_proxy=localhost
      - TZ=Europe/London

  chrome:
    image: selenium/node-chrome:3.8.1-dubnium
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - no_proxy=localhost
      - TZ=Europe/London

  hub:
    image: selenium/hub:3.8.1-dubnium
    ports:
      - "4444:4444"
    environment:
      - SE_OPTS=-enablePassThrough false

and the value enablePassThrough is set to false in the hub.

If you were referring to the nodes, it seems that no matter what you set, the value will be shown as true. But according to my checks, the important value is the one set in the hub.

Additionally, I also found out that this flag will be removed in the next Selenium release, which means that "enablePassThrough=true" always.

@sahil1610
Copy link
Author

Thanks @diemol.

This indeed is working to set enablePassThrough to false for the hub.

But this doesn't make actions library to work in firefox, which is actually working if I am NOT using selenium grid.

Any idea about this?

@diemol
Copy link
Member

diemol commented Jan 10, 2018

Hi @sahil1610,

Yesterday I found out that even if in the node it shows enablePassThrough=true when you pass SE_OPTS=-enablePassThrough false, the setting works. So please try it like that:

# To execute this docker-compose yml file use docker-compose -f <file_name> up
# Add the "-d" flag at the end for deattached execution
version: '2'
services:
  firefox:
    image: selenium/node-firefox:3.8.1-dubnium
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - no_proxy=localhost
      - TZ=Europe/London
      - SE_OPTS=-enablePassThrough false

  chrome:
    image: selenium/node-chrome:3.8.1-dubnium
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - hub
    environment:
      - HUB_HOST=hub
      - no_proxy=localhost
      - TZ=Europe/London
      - SE_OPTS=-enablePassThrough false

  hub:
    image: selenium/hub:3.8.1-dubnium
    ports:
      - "4444:4444"
    environment:
      - SE_OPTS=-enablePassThrough false

I also saw your comment in SeleniumHQ/selenium#4665, so if after trying again, you still have the issue. I'd recommend open an issue in the main Selenium repo with a clear way to reproduce the problem.

Regarding docker-selenium, I think it is clear that it is not an issue of the images. I'll leave this issue open for a couple of days in case you have more feedback, and after that I'll go ahead and close it.

@sahil1610
Copy link
Author

Thanks @diemol

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants