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

你。 提交于 2020-01-10 06:11:19

问题


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?


回答1:


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 createSession
INFO: 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.



回答2:


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.



来源:https://stackoverflow.com/questions/58796324/how-to-fix-1573451709-039warning-timed-out-connecting-to-chrome-retrying

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!