SeleniumHQ / docker-selenium

Provides a simple way to run Selenium Grid with Chrome, Firefox, and Edge using Docker, making it easier to perform browser automation
http://www.selenium.dev/docker-selenium/
Other
7.97k stars 2.51k forks source link

Browser crashes after the test execution #382

Closed romsper closed 7 years ago

romsper commented 7 years ago

Hello.

Before, I have had docker with Selenium 2.53.0 version and it has worked normally. Recently I have updated to 3.0.1 and got a troubles...

I have installed:

$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:3.0.1-fermium $ docker run -d --link selenium-hub:hub selenium/node-chrome:3.0.1-fermium

After test I catch a strange error:

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.076 s [INFO] Finished at: 2017-02-06T12:43:20+03:00 [INFO] Final Memory: 24M/306M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project am-automation: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test failed: There was an error in the forked process [ERROR] org.testng.TestNGException: [ERROR] [ERROR] Cannot instantiate class ui_mobile.ShowSerpTest [ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:40) [ERROR] at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:363) [ERROR] at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:275) [ERROR] at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:126) [ERROR] at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:191) [ERROR] at org.testng.TestClass.getInstances(TestClass.java:100) [ERROR] at org.testng.TestClass.initTestClassesAndInstances(TestClass.java:86) [ERROR] at org.testng.TestClass.init(TestClass.java:78) [ERROR] at org.testng.TestClass.(TestClass.java:41) [ERROR] at org.testng.TestRunner.initMethods(TestRunner.java:425) [ERROR] at org.testng.TestRunner.init(TestRunner.java:252) [ERROR] at org.testng.TestRunner.init(TestRunner.java:222) [ERROR] at org.testng.TestRunner.(TestRunner.java:163) [ERROR] at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:585) [ERROR] at org.testng.SuiteRunner.init(SuiteRunner.java:189) [ERROR] at org.testng.SuiteRunner.(SuiteRunner.java:136) [ERROR] at org.testng.TestNG.createSuiteRunner(TestNG.java:1375) [ERROR] at org.testng.TestNG.createSuiteRunners(TestNG.java:1355) [ERROR] at org.testng.TestNG.runSuitesLocally(TestNG.java:1209) [ERROR] at org.testng.TestNG.runSuites(TestNG.java:1133) [ERROR] at org.testng.TestNG.run(TestNG.java:1104) [ERROR] at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281) [ERROR] at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75) [ERROR] at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) [ERROR] Caused by: java.lang.reflect.InvocationTargetException [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [ERROR] at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29) [ERROR] ... 26 more [ERROR] Caused by: org.openqa.selenium.remote.SessionNotFoundException: no such session [ERROR] (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-31-generic x86_64) (WARNING: The server did not provide any stacktrace information) [ERROR] Command duration or timeout: 19 milliseconds [ERROR] Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' [ERROR] System info: host: 'e58cb15b0689', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-31-generic', java.version: '1.8.0_111' [ERROR] Driver info: org.openqa.selenium.chrome.ChromeDriver [ERROR] Capabilities [{message=unknown error: cannot parse capability: pageLoadStrategy [ERROR] from unknown error: page load strategy unsupported [ERROR] (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-31-generic x86_64), platform=ANY}] [ERROR] Session ID: 6f5dfaa9d14846041777194e7eed2e3b [ERROR] Command duration or timeout: 140 milliseconds [ERROR] Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' [ERROR] System info: host: 'mac617spb.local', ip: '10.201.10.18', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_121' [ERROR] Driver info: org.openqa.selenium.remote.RemoteWebDriver [ERROR] Capabilities [{webdriver.remote.sessionid=24da944c-8a2f-4fa9-a8e1-0165eef80f46, locationContextEnabled=true, webStorageEnabled=true, takesScreenshot=true, javascriptEnabled=true, message=unknown error: cannot parse capability: pageLoadStrategy [ERROR] from unknown error: page load strategy unsupported [ERROR] (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-31-generic x86_64), hasTouchScreen=true, cssSelectorsEnabled=true, platform=ANY}] [ERROR] Session ID: 24da944c-8a2f-4fa9-a8e1-0165eef80f46 [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [ERROR] at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) [ERROR] at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) [ERROR] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) [ERROR] at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:865) [ERROR] at helpers.InitDriver.browser(InitDriver.java:51) [ERROR] at ui_mobile.TestBase.(TestBase.java:14) [ERROR] at ui_mobile.ShowSerpTest.(ShowSerpTest.java:23) [ERROR] ... 31 more [ERROR] Caused by: org.openqa.selenium.NoSuchSessionException: no such session [ERROR] (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-31-generic x86_64) (WARNING: The server did not provide any stacktrace information) [ERROR] Command duration or timeout: 19 milliseconds [ERROR] Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700' [ERROR] System info: host: 'e58cb15b0689', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-31-generic', java.version: '1.8.0_111' [ERROR] Driver info: org.openqa.selenium.chrome.ChromeDriver [ERROR] Capabilities [{message=unknown error: cannot parse capability: pageLoadStrategy [ERROR] from unknown error: page load strategy unsupported [ERROR] (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.4.0-31-generic x86_64), platform=ANY}] [ERROR] Session ID: 6f5dfaa9d14846041777194e7eed2e3b [ERROR] Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' [ERROR] System info: host: 'mac617spb.local', ip: '10.201.10.18', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_121' [ERROR] Driver info: driver.version: RemoteWebDriver [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [ERROR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [ERROR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [ERROR] at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [ERROR] at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:216) [ERROR] at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:168) [ERROR] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:635) [ERROR] at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:822) [ERROR] at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringTimeouts.implicitlyWait(EventFiringWebDriver.java:559) [ERROR] at org.openqa.selenium.remote.server.handler.ConfigureTimeout.call(ConfigureTimeout.java:48) [ERROR] at org.openqa.selenium.remote.server.handler.ConfigureTimeout.call(ConfigureTimeout.java:27) [ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [ERROR] at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176) [ERROR] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [ERROR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [ERROR] at java.lang.Thread.run(Thread.java:745) [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

At Grid I see this: https://monosnap.com/file/7dyQHP187YGeym9OffbvMyB6TC8vGe

Please Help me! :)

ddavison commented 7 years ago

hey @romsper, new images have been pushed - please let me know if this fixes your issue

romsper commented 7 years ago

Hi @ddavison The same error again...

elgalu commented 7 years ago

I think the problem:

cannot parse capability: pageLoadStrategy

Is because that capability is Firefox specific but you are testing in Chrome. Can you try upgrading selenium java library to latest?

Added to that there is another issue, the change log shows:

Changed capability name from pageLoadingStrategy to pageLoadStrategy

So the wiki seems to need an updated but I don't have perms to edit it.

romsper commented 7 years ago

@elgalu I tried delete the capability in 3.0.1-fermium, but it didn't help me. @ddavison I deleted the capability in 3.0.1-germanium and it helped me!

Thanks all!