This repository was archived by the owner on Nov 29, 2018. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 195
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
Getting "Error communicating with the remote browser. It may have died." with chromedriver #3153
Copy link
Copy link
Closed
Description
Originally reported on Google Code with ID 3153
What steps will reproduce the problem?
1. Start test code for Chrome (works for IE and Firefox)
What is the expected output? What do you see instead?
I would expect to see the browser start up. This used to be working before. It hasn't
been for quite a while, but I am not sure what (if anything) changed between it working
and not working. The nightly tests are just running a simple logon-logoff test now
and were not critical until now.
Here is the console output I get from my program through the grid:
[TestNG] Running:
Command line suite
Creating Selenium googlechrome http://iiscf1a session...
Trying to start test session with: Capabilities [{platform=ANY, browserName=chrome,
chrome.switches=[--ignore-certificate-errors], v
ersion=}]
Unable to create Selenium session.
Jan 5, 2012 1:20:55 PM simplegridtestng.DOTN_LoginTest setUp
SEVERE: null
org.openqa.selenium.WebDriverException: Error communicating with the remote browser.
It may have died.
Build info: version: '2.14.0', revision: '14955', time: '2011-11-29 11:43:45'
System info: os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.0', java.version:
'1.6.0_29'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:396)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:76)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:84)
at dotn_helper.DOTN_Helper.<init>(DOTN_Helper.java:323)
at simplegridtestng.DOTN_LoginTest.setUp(DOTN_LoginTest.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:76)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:525)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:202)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
at org.testng.TestRunner.beforeRun(TestRunner.java:624)
at org.testng.TestRunner.run(TestRunner.java:592)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
at org.testng.SuiteRunner.run(SuiteRunner.java:223)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
at org.testng.TestNG.run(TestNG.java:900)
at simplegridtestng.SimpleGridTestNG.main(SimpleGridTestNG.java:74)
Caused by: org.apache.http.ConnectionClosedException: Premature end of Content-Length
delimited message body (expected: 4411; received: 2543
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:197)
at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:105)
at org.apache.http.conn.BasicManagedEntity.streamClosed(BasicManagedEntity.java:152)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:237)
at org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:186)
at org.apache.http.util.EntityUtils.consume(EntityUtils.java:67)
at org.openqa.selenium.remote.HttpCommandExecutor$EntityWithEncoding.<init>(HttpCommandExecutor.java:490)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:378)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:382)
... 25 more
Selenium version: 2.14.0
ChromeDriver.EXE Version: 18.0.995.0 (It fails the same way with 17.0.963.0)
OS: Windows Vista
Browser: Google Chrome
Browser version: N/A (always the latest version)
I am running through a grid server, but the program, grid server, and node server are
all running locally on the same Vista VM in this case.
My tests are being initiating via TestNG and the browser is being started up by this
code (DOTN_Helper.java:323):
public DOTN_Helper(TestParameters testParameters) throws Exception
{
String str;
org.openqa.selenium.remote.DesiredCapabilities capability;
String[] chromeSwitches =
{
"--ignore-certificate-errors"
};
FirefoxProfile ffProfile;
final String[] BROWSERS =
{
"*firefox",
"*iexplore",
"googlechrome",
"htmlunit",
// "safari", // Not supported by RemoteWebdriver yet.
"opera"
};
setTestParams(testParameters);
testNG = testParameters.testNG;
switch (Parser.findString(browserName, BROWSERS))
{
case 0:
capability = DesiredCapabilities.firefox();
str = "Firefox" + browserVersion + ".profile";
ffProfile = new FirefoxProfile(new File(str));
capability.setCapability(FirefoxDriver.PROFILE, ffProfile);
break;
case 1:
capability = DesiredCapabilities.internetExplorer();
break;
case 2:
capability = DesiredCapabilities.chrome();
capability.setCapability("chrome.switches",
Arrays.asList(chromeSwitches));
//capability.setCapability("chrome.binary",
// "C:\\Program Files\\Google\\Google Chrome\\chrome.exe");
break;
case 3:
capability = DesiredCapabilities.htmlUnit();
capability.setJavascriptEnabled(true); // Off by default for htmlUnit
break;
case 4:
capability = DesiredCapabilities.opera();
break;
default:
throw new Exception("Unknown browser name for RemoteWebDriver: " +
browserName + ".");
} // switch
if (platform.equalsIgnoreCase("WINDOWS") || browserName.equals(
"*iexplore"))
capability.setPlatform(Platform.WINDOWS);
else
capability.setPlatform(Platform.ANY);
capability.setVersion(browserVersion);
Reporter.log("Trying to start test session with: " +
capability.toString(), true);
driver = new RemoteWebDriver(new URL("http://" + host + ":" + port +
"/wd/hub"), capability);
Chromedriver.log file:
[0104/203114:ERROR:automation_json_requests.cc(42)] JSON request failed: GetAppModalDialogMessage
with error: No modal dialog is showing
[0104/203117:ERROR:ipc_channel_win.cc(247)] pipe error: 109
Reported by lvskiprof
on 2012-01-05 21:36:22