org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser.

523 görüntüleme
İlk okunmamış mesaja atla

Vipul Garg

okunmadı,
11 Tem 2016 05:09:0311.07.2016
alıcı Selenium Users
Hi,

I am using Selenium webdriver for firefox(45.0) and facing following exception while running one of my test scripts :
Jul 09, 2016 9:09:19 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7056
Jul 09, 2016 9:09:19 AM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.BindException) caught when processing request to {}->http://127.0.0.1:7056: Address already in use: connect
Jul 09, 2016 9:09:19 AM org.apache.http.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://127.0.0.1:7056
Jul 09, 2016 9:09:19 AM org.openqa.selenium.support.ui.ExpectedConditions findElement
WARNING: WebDriverException thrown by findElement(By.xpath: /html/body/div[6]/div[2]/div/div/div/div/div/div/div/div[1]/button[2])
org.openqa.selenium.remote.UnreachableBrowserException: Error communicating with the remote browser. It may have died.
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'c40-osi-sumit', ip: '10.131.10.78', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.7.0_79'
Driver info: driver.version: RemoteWebDriver
Session ID: 0a9d2da6-475c-4be3-ae04-08d2670fecd6
Capabilities [{platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, browserName=firefox, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=45.0.2}]
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:363)
	at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:500)
	at org.openqa.selenium.By$ByXPath.findElement(By.java:361)
	at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:355)
	at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:899)
	at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:41)
	at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:181)
	at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:178)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:238)
	at com.dmainc.tifr.test.setup.KeyWord.click_on_link_alt(KeyWord.java:380)
	at com.dmainc.tifr.test.setup.KeyWord.verify_process_status_Complete(KeyWord.java:2142)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.dmainc.tifr.test.executor.Executor.runReflectionMethod(Executor.java:184)
	at com.dmainc.tifr.test.executor.Executor.execute(Executor.java:68)
	at com.dmainc.tifr.test.process.ExecuteTaxContentInputAdapterTest.runProcess(ExecuteTaxContentInputAdapterTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
	at org.testng.TestNG.run(TestNG.java:1031)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:281)
	at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:75)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:121)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
Caused by: java.net.BindException: Address already in use: connect
	at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:74)
	at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134)
	at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:71)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:162)
	at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:90)
	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
	at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
	at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
	... 44 more
------------------------
I tried following things:

1)I increased the jenkins memory using a global variable with value(-Xmx4048m -XX:MaxPermSize=4028m).
2) Also I used forkCount option in pom.xml as given below:
                            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<additionalClasspathElements>
	            		<additionalClasspathElement>resources</additionalClasspathElement>
		          	</additionalClasspathElements>
		          		<forkCount>3</forkCount>
    					<reuseForks>true</reuseForks>
   						<argLine>-Xmx3072m -XX:MaxPermSize=512m</argLine>
					<suiteXmlFiles>
						<!-- TestNG suite XML files -->
						<suiteXmlFile>testng.xml</suiteXmlFile>
					</suiteXmlFiles>	
				
				</configuration>
			</plugin>


3) I tried to solve this issue by increasing the application servers heap size to 6 gb.

But still this issue is not resolved.Please provide the solution to this problem.

Thanks

lorenzo...@openbravo.com

okunmadı,
26 Tem 2016 09:14:5926.07.2016
alıcı Selenium Users
Hi. This issue is also happening to me since June more or less. I have several test suites and everything was working fine. I was using Firefox 38.6.1esr and Selenium 2.47.1. I updated to Firefox 45.2.0esr and Selenium 2.53.1. After that update some random error started to happen. I have recorded what is going on and the browser just dies randomly. Sometimes it crashes when the browser is being started and other times at the middle of some action. No clear pattern.
The error message:

Error communicating with the remote browser. It may have died.
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'ubuntu.localdomain', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-106-generic', java.version: '1.7.0_101'
Driver info: driver.version: EventFiringWebDriver
Session ID: dbed6592-c61c-447a-818a-3fd57c96b860
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, cssSelectorsEnabled=true, databaseEnabled=true, overlappingCheckDisabled=true, browserName=firefox, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, rotatable=false, locationContextEnabled=true, applicationCacheEnabled=true, takesScreenshot=true, version=45.0}]
Command duration or timeout: 219 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'ubuntu.localdomain', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-106-generic', java.version: '1.7.0_101'
Session ID: 454af9e4-fffb-4f95-990f-262a6e5e970c
Driver info: com.openbravo.test.integration.selenium.RemoteWebDriver
Capabilities [{platform=LINUX, javascriptEnabled=true, acceptSslCerts=true, overlappingCheckDisabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, webdriver.remote.sessionid=454af9e4-fffb-4f95-990f-262a6e5e970c, version=45.0, databaseEnabled=true, cssSelectorsEnabled=true, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]


Andrew Jervis

okunmadı,
27 Tem 2016 12:22:4527.07.2016
alıcı Selenium Users
Vipul

It seems there was issue with Firefox 47.0 and Selenium 2.53

On June 30 2016 a new version of Selenium 2.53.1 was released which works is believed to work ok with Firefox 47.0

I carried out some testing and Firefox 47.0 semmed to work ok with Selenium 2.53.1 of 30/06/2016

Regards, Andrew Jervis
Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti