FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

org.openqa.selenium.WebDriverException: Error communicating with the remote browser. It may have died. #1144

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
Running a junit.org & FluentLenium test class with multiple test methods with a 
policy that starts the browser for each method resulted in an "error 
communicating with the remote browser" error.

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):

* Create a Selenium JSON configuration file for the Linux node, taking care of 
removing the trailing comma at the end of the last (and the only) browser 
group.  Specify the path to the latest chromedriver's verbose shell wrapper in 
the group.

* Start the latest selenium server on the Linux node host in the node role.

* Start the same server on the local Linux host in the hub role.
The test, one of several methods, starts the browser, opens a URL to a local 
HTTPS web service, logs in with user credentials, proceeds to user settings and 
attempts to change the password using an incorrect old password.

* Start the Java test on the local host, specifying 
(a) the binary path to the latest Chromium unzipped on the node host
(b) command line arguments for starting Chromium, "--no-sandbox 
--disable-impl-side-painting" 
through Java properties recognized by the test code that will pass them using 
ChromeOptions#setBinary() and ChromeOptions#addArguments(), respectively, 
followed by DesiredCapabilities#setCapability(ChromeOptions.CAPABILITY, 
options).

* One of the multiple tests will fail as if the time to shut down the browser 
at the end of the test exceeded some limit (10s?) hard-coded into chromedriver:

============================================================================

Time: 763.739
There was 1 failure:
1) incorrectOldPassword(Foo.BarTest)
org.openqa.selenium.WebDriverException: Error communicating with the remote 
browser. It may have died.
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:16:47'
System info: host: 'sel-linux-vm09', ip: '10.0.8.53', os.name: 'Linux', 
os.arch: 'amd64', os.version: '3.2.0-23-generic', java.version: '1.6.0_27'
Driver info: driver.version: EventFiringWebDriver
Command duration or timeout: 11.48 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'MYHOST', ip: '127.0.1.0', os.name: 'Linux', os.arch: 
'amd64', os.version: '4.0.0-2-amd64', java.version: '1.7.0_80'
Session ID: 3881af38-333c-4123-8c34-f7daa390d56c
Driver info: BAZ.Browser$6$1
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.8wknkO}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
webdriver.remote.sessionid=3881af38-333c-4123-8c34-f7daa390d56c, 
version=45.0.2447.0, takesHeapSnapshot=true, databaseEnabled=false, 
cssSelectorsEnabled=true, handlesAlerts=true, browserConnectionEnabled=false, 
nativeEvents=true, webStorageEnabled=true, hasTouchScreen=false, 
applicationCacheEnabled=false, takesScreenshot=true}]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:610)
        at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:464)
        at org.fluentlenium.core.FluentAdapter.quit(FluentAdapter.java:201)
        at org.fluentlenium.adapter.FluentTest$1.finished(FluentTest.java:87)
        at org.junit.rules.TestWatcher.finishedQuietly(TestWatcher.java:111)
        at org.junit.rules.TestWatcher.access$400(TestWatcher.java:46)
        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:64)
        at org.junit.rules.RunRules.evaluate(RunRules.java:20)
        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runners.Suite.runChild(Suite.java:127)
        at org.junit.runners.Suite.runChild(Suite.java:26)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:117)
        at org.junit.runner.JUnitCore.runMain(JUnitCore.java:96)
        at org.junit.runner.JUnitCore.runMainAndExit(JUnitCore.java:47)
        at org.junit.runner.JUnitCore.main(JUnitCore.java:40)
Caused by: org.openqa.selenium.remote.UnreachableBrowserException: Error 
communicating with the remote browser. It may have died.
Build info: version: '2.46.0', revision: '87c69e2', time: '2015-06-04 16:16:47'
System info: host: 'sel-linux-vm09', ip: '10.0.8.53', os.name: 'Linux', 
os.arch: 'amd64', os.version: '3.2.0-23-generic', java.version: '1.6.0_27'
Driver info: driver.version: EventFiringWebDriver
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'MYHOST', ip: '127.0.1.0', os.name: 'Linux', os.arch: 
'amd64', os.version: '4.0.0-2-amd64', java.version: '1.7.0_80'
Driver info: driver.version: unknown

FAILURES!!!
Tests run: 5,  Failures: 1

============================================================================

The attached output from the Selenium node server (with timestamps in the next 
time zone) shows what looks like attempts of the Apache's HttpClient stale 
connection checker to revive the connection that was shut probably because of 
terminating the browser.

Original issue reported on code.google.com by eelgh...@gmail.com on 7 Jul 2015 at 4:32

Attachments:

GoogleCodeExporter commented 9 years ago
I used xvfb-run to launch the the selenium server on the node in a large-size 
virtual X server,

/usr/bin/xvfb-run --server-args=":1 -screen 0 1024x768x24" java 
-Dwebdriver.chrome.driver=./chromedriververbose -jar 
selenium-server-standalone-2.46.0.jar -role node -nodeConfig 
linux_node_eelgheez.json -log 
node_eelgheez-2.16-chromium-latest-selenium-2.46.log -debug

Original comment by eelgh...@gmail.com on 7 Jul 2015 at 4:38

GoogleCodeExporter commented 9 years ago
I obtained the latest chromium with these commands,

wget -O - -q 
http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAS
T_CHANGE

wget 
http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/337
274/chrome-linux.zip

Original comment by eelgh...@gmail.com on 7 Jul 2015 at 4:43

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Attaching a fragment of the test output, the summary of which shows in the 
above description.

Original comment by eelgh...@gmail.com on 7 Jul 2015 at 5:08

Attachments:

GoogleCodeExporter commented 9 years ago
Does this issue indicate a deficiency in chromedriver or 
selenium-server-standalone?

Original comment by eelgh...@gmail.com on 10 Jul 2015 at 2:47

villisaravanan commented 6 years ago

update latest chromedriver.exe, it will works fine