How to fix [1573451709.039][WARNING]: Timed out connecting to Chrome, retrying... while using chrome version 78 and chrome driver version 78.0.3904.70 How to fix [1573451709.039][WARNING]: Timed out connecting to Chrome, retrying... while using chrome version 78 and chrome driver version 78.0.3904.70 selenium selenium

How to fix [1573451709.039][WARNING]: Timed out connecting to Chrome, retrying... while using chrome version 78 and chrome driver version 78.0.3904.70


This error message...

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.[1573451703.668][WARNING]: Timed out connecting to Chrome, retrying...Nov 11, 2019 11:25:05 AM org.openqa.selenium.remote.ProtocolHandshake createSessionINFO: Detected dialect: W3C[1573451709.039][WARNING]: Timed out connecting to Chrome, retrying...

...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.


Analysis

The first log message:

Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.

is part of the startup log when using ChromeDriver and is informative in nature.

You can find a detailed discussion in How do I protect the ports that chromedriver use?


The following log message:

[1573451703.668][WARNING]: Timed out connecting to Chrome, retrying...

indicates there are some incompatibility between the version of the binaries you are using.


Solution

Ensure that:

  • JDK is upgraded to current levels JDK 8u222.
  • Selenium is upgraded to current levels Version 3.141.59.
  • ChromeDriver is updated to current ChromeDriver v78.0 level.
  • Chrome is updated to current Chrome Version 78.0 level. (as per ChromeDriver v78.0 release notes)
  • 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.
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.


I had to update to the dev version of chrome 79 and the latest dev version of chromedriver to make it work. Although I've run against other issues with this version, so I don't know if its a good solution.