On our project, was decided to use ui-tests as unit-tests. For this we wrote several tests. All of them use one port. Before running tests I execute command from command line (by CI): nohup Xvfb :2 -screen 0 1920x1080x24 & chromedriver --whitelisted-ips --port = 60000 (DISPLAY and PATH, of course, are set in the same session).
If the browser is not closed after tests, it works fine. But we can not do this. It must be closed after each test. If I do:
} finally {
browser.quit();
}
first test is ok. But after this, we have hang process chromedriver, and used port 60000 (those, I can't run listener: chromedriver --whitelisted-ips --port = 60000 and so on). And next test failed:
DEBUG org.apache.http.wire - << "{"sessionId":"be69384516355ddaefd5951a10fa3f82","status":13,"value":{"message":"unknown error: Chrome failed to start: exited abnormally\n (Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 3.13.0-45-generic x86_64)"}}"
[main] DEBUG org.apache.http.impl.conn.DefaultClientConnection - Connection 0.0.0.0:34493<->127.0.0.1:60000 shut down
[main] DEBUG org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager - Released connection is not reusable.
[main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Releasing connection [{}->http://localhost:60000][null]
[main] DEBUG org.apache.http.impl.conn.DefaultClientConnection - Connection 0.0.0.0:34493<->127.0.0.1:60000 closed
[main] DEBUG org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Notifying no-one, there are no waiting threads
...
org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.28.455506 (18f6627e265f442aeec9b6661a49fe819aeeea1f),platform=Linux 3.13.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information); duration or timeout: 60.03 seconds
Build info: version: '2.10.0', revision: '14416', time: '2011-10-27 23:00:15'
ystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-45-generic', java.version: '1.6.0'
Driver info: driver.version: ChromeDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:147)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:113)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:417)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:115)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:76)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:120)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:98)
at ru.blogic.lecm.plugin.base.test.executor.DOHTestUIExecutor.execute(DOHTestUIExecutor.java:74)
at ru.blogic.lecm.plugin.base.test.executor.DOHTestExecutor.testUI(DOHTestExecutor.java:78)
at ru.blogic.lecm.plugin.base.test.executor.DOHTestExecutor.test(DOHTestExecutor.java:65)
at ru.blogic.lecm.plugin.base.test.examples.DOHDemoNoUITest.testUtils(DOHDemoNoUITest.java:20)
I tried to run listener from java code at tests start, like this:
Runtime.getRuntime().exec("export DISPLAY=:2 & export PATH=$PATH:/usr/lib/chromium-browser/ & nohup Xvfb :2 -screen 0 1920x1080x24 & chromedriver --whitelisted-ips --port=60000");
and in finally block I try to kill process hardly:
Runtime.getRuntime().exec("pkill chromedriver");
but nothing changed.
Related
I have the following code that launches Edge in IE Compatibility mode:
case EDGE_COMPATIBILITY: {
logMessage(MessType.INFO, "Running Edge under compatibility mode.");
InternetExplorerOptions ieOptions = new InternetExplorerOptions();
ieOptions.introduceFlakinessByIgnoringSecurityDomains();
ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
ieOptions.attachToEdgeChrome();
ieOptions.destructivelyEnsureCleanSession();
System.setProperty("webdriver.ie.driver", projectLoc + "\\src\\externaljars\\selenium\\edgedriver\\iedriverserver.exe");
try {
logMessage(MessType.INFO, "About to create 'webdr'");
webdr = new InternetExplorerDriver(ieOptions);
logMessage(MessType.INFO, "Sleeping for 10 seconds.");
Thread.sleep(10000);
logMessage(MessType.INFO, "Done sleeping ...");
webdr.manage().window().maximize();
Thread.sleep(1000);
} catch (Exception e) {
e.printStackTrace();
}
break;
}
This works great when running the automated scripts locally, here is what it looks like:
TITLE Executing Method launchBrowser Time: [1:38:34PM]
INFO TEMP LOG MESSAGE : Data Source: DATABASE Browser: EDGE_COMPATIBILITY URL: null
INFO TEMP LOG MESSAGE : Browser: EDGE_COMPATIBILITY
INFO Running Edge under compatibility mode.
INFO About to create 'webdr'
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Started InternetExplorerDriver server (32-bit)
4.7.0.0
Listening on port 23537
Only local connections are allowed
INFO Sleeping for 10 seconds.
INFO Done sleeping ...
but when I try to run the same code from a Jenkins server, I get the following exception error:
14:02:26 [testng] TITLE Executing Method launchBrowser Time: [4:2:26PM]
14:02:26 [testng] INFO TEMP LOG MESSAGE : Data Source: DATABASE Browser: EDGE_COMPATIBILITY URL: null
14:02:26 [testng] INFO TEMP LOG MESSAGE : Browser: EDGE_COMPATIBILITY
14:02:26 [testng] INFO Running Edge under compatibility mode.
14:02:26 [testng] INFO About to create 'webdr'
14:02:27 [testng] Started InternetExplorerDriver server (32-bit)
14:02:27 [testng] 4.7.0.0
14:02:27 [testng] Listening on port xxxxxx
14:02:27 [testng] Only local connections are allowed
14:05:28 [testng] org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
14:05:28 [testng] Host info: host: 'xxxxxxxxxx', ip: 'xx.xx.xx.xx'
14:05:28 [testng] Build info: version: '4.6.0', revision: '79f1c02ae20'
14:05:28 [testng] System info: os.name: 'Windows Server 2016', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.11'
14:05:28 [testng] Driver info: org.openqa.selenium.ie.InternetExplorerDriver
14:05:28 [testng] Command: [null, newSession {capabilities=[Capabilities {browserName: internet explorer, se:ieOptions: {ie.edgepath: C:\Program Files (x86)\Micr..., ignoreProtectedModeSettings: true}}], desiredCapabilities=Capabilities {browserName: internet explorer, se:ieOptions: {ie.edgepath: C:\Program Files (x86)\Micr..., ignoreProtectedModeSettings: true}}}]
14:05:28 [testng] Capabilities {}
14:05:28 [testng] at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
What is even more interesting is that if I log onto the Jenkins server to see what's going on, then I don't get the exception error. It is as though attaching a screen output completes the instantiation process.
Does anyone know whether this is a Jenkins limitation? Or are there any other InternetOptions that I should be using.
Source code:
package Labarary;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class LAb {
public static void main(String[] args) {
System.out.println("chrome");
System.setProperty("webdriver.chrome.driver","C:\\Users\\Manjit\\Downloads\\chromedriver_win32\\chromedriver.exe");
// TODO Auto-generated method stub
WebDriver driver=new ChromeDriver();
}
}
Invalid port. Exiting...
??? ??, ???? ??:??:?? ???????
org.openqa.selenium.os.OsProcess checkForError SEVERE:
org.apache.commons.exec.ExecuteException: Process exited with an
error: 1 (Exit value: 1) Exception in thread "main"
org.openqa.selenium.WebDriverException: Timed out waiting for driver
server to start. Build info: version: '3.12.0', revision: '7c6e0b3',
time: '2018-05-08T15:15:03.216Z' System info: host: 'MANJIT-PC', ip:
'192.168.1.19', os.name: 'Windows 7', os.arch: 'amd64', os.version:
'6.1', java.version: '1.8.0_171' Driver info: driver.version:
ChromeDriver at
org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:192)
at
org.openqa.selenium.remote.service.DriverService.start(DriverService.java:178)
at
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:181)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:168)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:123)
at Labarary.LAb.main(LAb.java:20) Caused by:
org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting
for [http://localhost:?????/status] to be available after ????? ms at
org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at
org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
... 9 more Caused by: java.util.concurrent.TimeoutException at
java.util.concurrent.FutureTask.get(Unknown Source) at
com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:148)
at
org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 10 more
This error message...
Invalid port. Exiting... ??? ??, ???? ??:??:?? ???????
org.openqa.selenium.os.OsProcess checkForError
...implies that the OsProcess is unable to bind the ChromeDriver server process to the assigned free port within your system.
As per the discussion Getting Invalid port error and Invalid port. Exiting...
"Invalid port. Exiting..." occurs when the port assigned to chromedriver is less than 0 or greater than 65535.
Debugging steps
Perform the following steps to address the core issue:
Execute netstat command through CLI to see if you have reached limit of possible open connections or check if there is another application running on the port used by ChromeDriver.
Check your firewall settings, there is a good chance that firewall configuration may be blocking the communication.
Upgrade ChromeDriver to current ChromeDriver v2.84 level.
Upgrade Chrome to current Chrome v84.0 levels. (as per ChromeDriver v84.0 release notes)
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
(WindowsOS only) Use CCleaner tool to wipe off all the OS chores before and after the execution of your Test Suite.
(LinuxOS only) Free Up and Release the Unused/Cached Memory in Ubuntu/Linux Mint before and after the execution of your Test Suite.
Take a System Reboot to free up the used ports.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.
Alternative
As an alternative you can force the WebDriver variant i.e. ChromeDriver to start on a specific port e.g. 65535 as follows:
Code Block:
System.setProperty("webdriver.chrome.driver","C:\\WebDrivers\\chromedriver.exe");
WebDriver driver= new ChromeDriver(new ChromeDriverService.Builder().usingPort(65535).build());
driver.get("https://www.google.com/");
Console Output:
Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103#{#416}) on port 65535
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Jul 20, 2020 7:36:17 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
References
You can find a couple of relevant detailed discussions in:
Invalid port. Exiting… org.openqa.selenium.os.OsProcess checkForError while launching chrome using selenium
I am trying to run the below code:
package automationFramework;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import appModules.SignIn_Action;
import utility.Constant;
import utility.ExcelUtils;
public class Apache_POI_TC {
private static WebDriver driver=null;
public static void main(String[] args) throws Exception {
ExcelUtils.setExcelFile(Constant.Path_TestData + Constant.File_TestData,"Sheet1");
System.setProperty("webdriver.chrome.driver","F:\\Chromedriver\\chromedriver_win32\\chromedriver.exe");
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get(Constant.URL);
SignIn_Action.execute(driver);
System.out.println("Login Successfully, now it is the time to Log Off buddy.");
driver.quit();
ExcelUtils.setCellData("Pass", 1, 3);
}}
But getting error:
Starting ChromeDriver 2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb) on port 17873
Only local connections are allowed.
[1525873930.811][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
[1525873930.816][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
Port not available. Exiting...
May 09, 2018 7:22:30 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'VAPW00000001503', ip: '10.96.62.163', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:665)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)
at automationFramework.Apache_POI_TC.main(Apache_POI_TC.java:25)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'VAPW00000001503', ip: '10.96.62.163', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:178)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:166)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
... 7 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:17873/status] to be available after 20004 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:107)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:175)
... 10 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:80)
... 11 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 12 more
Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
Please suggest how can i solve this
This error message...
Port not available. Exiting...
May 09, 2018 7:22:30 PM org.openqa.selenium.os.UnixProcess checkForError
...implies that the OS Unix Process is unable to bind to the assigned free port within your system.
As per the discussion Getting Invalid port error. the error `"Invalid port. Exiting..." occurs when the port assigned to chromedriver is less than 0 or greater than 65535.
But, historically as per the discussions:
CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726) Port not available. Exiting… with chromedriver and Selenium 3.2
CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x27t6) Port not available. Exiting… in Selenium Webdriver
It had been observed that when both ChromeDriver and GeckoDriver are shared over the network, while initializing the Browser Client the following errors are observed:
Sample A:
Starting ChromeDriver 2.28.455520 (cc17746adff54984afff480136733114c6b3704b) on port 12121
Only local connections are allowed.
[0.023][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
[0.023][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
Port not available. Exiting...
Mar 11, 2017 9:13:06 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Sample B:
[0.147][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
Port not available. Exiting...
Sample C:
[1525873930.816][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
Port not available. Exiting...
May 09, 2018 7:22:30 PM org.openqa.selenium.os.UnixProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
And even:
//chromedriver
[1530079175.164][SEVERE]: CreatePlatformSocket() returned an error: An invalid argument was supplied. (0x2726)
[1530079175.165][INFO]: listen on IPv4 failed with error ERR_INVALID_ARGUMENT
//geckodriver
An invalid argument was supplied. (os error 10022)
//IEDriverServer
Failed to start the server with: port = '2305', host = '', log level = '', log file = '', whitelisted ips = ''
Solution
Ensure that ChromeDriver or GeckoDriver are placed within the local drives of the host machine.
Execute netstat command through CLI to see if you have reached limit of possible open connections or check if there is another application running on the given port.
Check your firewall settings, there is a good chance that firewall configuration may be causing the issue.
Upgrade ChromeDriver to current ChromeDriver v2.38 level.
Keep Chrome version at Chrome v66.x levels. (as per ChromeDriver v2.38 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
If your base Web Client version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Web Client.
Take a System Reboot to free up the ports.
Execute your #Test.
I have a Java Selenium project that will not run on my machine, but does run on coworkers' machines with the same OS version (OSX 10.13.1), Chrome browser version (63.0.3239.84), and chromedriver version (2.34). I get the message:
Starting ChromeDriver 2.34.522932 (4140ab217e1ca1bec0c4b4d1b148f3361eb3a03e) on port 18633
Only local connections are allowed.
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T18:33:54.468Z'
System info: host: 'localhost', ip: 'fe80:0:0:0:1cc9:e0ab:f4e5:dd34%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.1', java.version: '1.8.0_20'
Driver info: driver.version: ChromeDriver
...
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:18633/status] to be available after 20005 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:187)
... 28 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:149)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 29 more
however when I open http://localhost:18633/status in my browser I get a valid response:
{"sessionId":"","status":0,"value":{"build":{"version":"alpha"},"os":{"arch":"x86_64","name":"Mac OS X","version":"10.13.1"}}}
I've tried swapping out chromedriver binaries, but I'm not really sure what else to do. I get similar issues with geckodriver, but that may or may not be the same issue.
I have also tried creating a new user on my system and running it from that account, to account for user settings - No luck.
What am I missing here? What info would be helpful to debug this problem?
The error says it all :
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Clearly indicates the WebDriver instance didn't get initiated. Hence Driver info is left blank as :
Driver info: driver.version: ChromeDriver
Which inturn produces the error:
org.openqa.selenium.net.UrlChecker$TimeoutException
and
java.util.concurrent.TimeoutException
It would be tough to guess the actual reason without any visibility of your code block but in general we can solve this by downloading the ChromeDriver binary from this repository and passing the absolute path of the ChromeDriver while initializing the WebDriver instance as follows :
System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
driver = new ChromeDriver();
Key Points :
Always use the latest version of the Selenium Client and ChromeDriver binaries.
Always keep the automatic updates for the browser enabled.
Always keep the JDK version updated (the current version being JDK 8u241)
I am getting the below error from today when I run my test suite. I am using chrome driver since our Application runs only on chrome. The same scripts are running fine in another machine.
Starting ChromeDriver 2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7) on port 37280
Only local connections are allowed.
Nov 12, 2014 11:33:36 AM org.openqa.selenium.os.UnixProcess$SeleniumWatchDog destroyHarder
INFO: Command failed to close cleanly. Destroying forcefully (v2).org.openqa.selenium.os.UnixProcess$SeleniumWatchDog#1c06d198
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'MyTerminal', ip: '10.54.205.137', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:589)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.chrome.ChromeDriver.startSession(ChromeDriver.java:181)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:160)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:128)
at ChromeTest.main(ChromeTest.java:14)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:18:15'
System info: host: 'MyTerminal', ip: '10.54.205.137', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:568)
... 7 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:37280/status] to be available after 20001 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
... 9 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
... 10 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:201)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
... 11 more
I have used following trouble shooting steps.
1. Tried disabling the gpu-watchdog in chrome
2. Re-Installed Chrome
3. Re-cloned all my project from git hub
4. Installed older version.
I don't have luck to run this. Can some one point me in right direction If I am missing something here.
My concern is these scripts ran till yesterday and suddenly I am getting this error.
Thanks in Advance.
After running out all possible options, At last I found a little solution for this. I played a trick with the chrome driver versions, But not sure why and how it worked. I have followed these steps
I have downloaded the latest version of chrome driver and ran my
selenium tests by configuring System.setProperty()
Now I double clicked the old chrome driver version (which I have used it for my
script earlier) while running my selenium script.
Then I configured my script back to my old version.
That's it my scripts are running smooth without any exceptions. :-)