My Chrome browser is updated to version 78 and when I tried to execute any code of automation, it shows the error
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 createSession
INFO: Detected dialect: W3C
[1573451709.039][WARNING]: Timed out connecting to Chrome, retrying...
How can I fix it?
This error message...
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Analysis
The first log message:
is part of the startup log when using ChromeDriver and is informative in nature.
The following log message:
indicates there are some incompatibility between the version of the binaries you are using.
Solution
Ensure that:
@Test
as non-root user.driver.quit()
withintearDown(){}
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.