docker-selenium icon indicating copy to clipboard operation
docker-selenium copied to clipboard

Browser hangs inside of browser after executed

Open derinbay opened this issue 9 years ago • 16 comments

Meta -

Image(s):
selenium/node-chrome:3.3.1-cesium Docker Version:
17.04.0-ce, build 4845c56 OS: Ubuntu 16.04

When tests are executing with node-chrome container, some of the containers are hanging after open the browser, as far as I see from the logs. I'm experiencing this problem since 3.2.0-actinium.

But with node-chrome-debug this never happened.

docker logs 720a3571429d2d2aae6a31cf037c5a1a0b69db4b253bb24a9cdeb59a6755a961 -f /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) /bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) 12:30:32.869 INFO - Selenium build info: version: '3.3.1', revision: '5234b32' 12:30:32.870 INFO - Launching a Selenium Grid node 2017-04-14 12:30:23.873:INFO::main: Logging initialized @1389ms to org.seleniumhq.jetty9.util.log.StdErrLog 12:30:23.934 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform LINUX 12:30:23.934 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform LINUX 12:30:23.934 INFO - Driver class not found: com.opera.core.systems.OperaDriver 12:30:23.935 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped: Unable to create new instances on this machine. 12:30:23.935 INFO - Driver class not found: com.opera.core.systems.OperaDriver 12:30:23.935 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 12:30:23.939 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped: registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform LINUX 2017-04-14 12:30:24.011:INFO:osjs.Server:main: jetty-9.2.20.v20161216 2017-04-14 12:30:24.128:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@441772e{/,null,AVAILABLE} 2017-04-14 12:30:24.170:INFO:osjs.AbstractConnector:main: Started ServerConnector@6379eb{HTTP/1.1,[http/1.1]}{0.0.0.0:5555} 2017-04-14 12:30:24.171:INFO:osjs.Server:main: Started @1687ms 12:30:24.171 INFO - Selenium Grid node is up and ready to register to the hub 12:30:24.193 INFO - Starting auto registration thread. Will try to register every 5000 ms. 12:30:24.194 INFO - Registering the node to the hub: http://172.17.0.2:4444/grid/register 12:30:24.218 INFO - The node is registered to the hub and ready to use 12:30:29.397 INFO - SessionCleaner initialized with insideBrowserTimeout 300000 and clientGoneTimeout 720000 polling every 30000 12:30:48.641 INFO - Executing: [new session: Capabilities [{test_machine=web, browserName=chrome, version=}]]) 12:30:48.655 INFO - Creating a new session for Capabilities [{test_machine=web, browserName=chrome, version=}] Starting ChromeDriver 2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5) on port 32003 Only local connections are allowed.

derinbay avatar Apr 14 '17 12:04 derinbay

can I see the command you're using to run the containers?

ddavison avatar Apr 14 '17 16:04 ddavison

@ddavison I'm using a docker-compose file to run the containers: gist link

derinbay avatar Apr 14 '17 16:04 derinbay

you're setting GRID_BROWSER_TIMEOUT, is it possible that it's hitting that timeout? we default this to "0" (indefinite)

ddavison avatar Apr 14 '17 17:04 ddavison

I'm setting that in case of some browser is hanged. In this case it's starting the browser as far as I saw from the logs and wait for 5 mins (grid_browser_timeout). If I don't set, isn't it going forever, since the default is 0?

derinbay avatar Apr 14 '17 17:04 derinbay

when this starts happening, is it just a few tests, then it breaks? or..

ddavison avatar Apr 14 '17 17:04 ddavison

Yes, just a few random tests are hanging, about %10. When I work with chrome-node-debug, this never happened.

PS: I scale nodes to test count right before starting to test. docker-compose scale chromenode=xx

derinbay avatar Apr 14 '17 17:04 derinbay

@ddavison I am seeing this issue as well, where after a few tests the run just hangs. I don't see this issue with 3.0.1. My meta information is is exactly the same as @derinbay

testphreak avatar Apr 14 '17 23:04 testphreak

Please ignore me linking 447 above. Probably unrelated.

testphreak avatar Apr 14 '17 23:04 testphreak

@testphreak you could try using the debug image and see through VNC what happens when the browser hangs. Maybe it is not necessarily something related to the docker-selenium image but more to a newer Selenium, Chrome or Chromedriver version?

diemol avatar Apr 15 '17 21:04 diemol

@diemol thanks for the suggestion. I find that my tests don't hang when running with node-chrome-debug. The test run hangs every time I use node-chrome. When I enable debugging for node-chrome container I see several errors related to http-outgoing-129 << "[read] I/O error: Read timed out". I don't see anything else that might point to an issue.

I don't see any issues with my tests when using node-chrome 3.0.1. So it appears to be an issue with 3.3.1-cesium. Do let me know if more information is needed.

testphreak avatar Apr 21 '17 01:04 testphreak

@diemol the read timeout issue is probably a red herring. But my tests continue to hang with node-chrome 3.4.0-actinium. Tests run fine on node-chrome-debug.

testphreak avatar Apr 21 '17 23:04 testphreak

@testphreak I'll check it during the weekend, would it be possible for you to provide a test case to reproduce it?

diemol avatar Apr 22 '17 06:04 diemol

@diemol I just realized this issue has nothing to do with the hang issues I was seeing with node-chrome. Opened a separate issue https://github.com/SeleniumHQ/docker-selenium/issues/465.

testphreak avatar Apr 22 '17 22:04 testphreak

Hi @derinbay,

I saw your comment. I would like to try to reproduce the error you get with the latest release, can you please help me with some test code you are using to get the error? Also the docker commands would be helpful.

diemol avatar Apr 28 '17 10:04 diemol

Hello @diemol I've found out that, today's hangs were for another reason. I've checked that on my full suits and everything seems fine now.

I can say that this issue has been fixed on 3.4.0

Thanks for your efforts.

derinbay avatar Apr 28 '17 13:04 derinbay

How cool @derinbay, I'm glad it is working 👍 Can you please close the issue?

diemol avatar Apr 28 '17 13:04 diemol