超时从渲染器接收消息:使用ChromeDriver和Chrome v80通过Selenium Java接收0.100条日志消息 [英] Timed out receiving message from renderer: 0.100 log messages using ChromeDriver and Chrome v80 through Selenium Java

查看:107
本文介绍了超时从渲染器接收消息:使用ChromeDriver和Chrome v80通过Selenium Java接收0.100条日志消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近通过ChromeDriver v80.0.3987.16和Chrome v80.0.3987.87(正式版)(64位)升级了测试环境,并且在升级后,即使最小的程序也产生了大量这些SEVERE日志:

  [1581082019.282] [SEVERE]:超时,接收到来自渲染器的消息:0.100 
[1581082020.245] [SEVERE]:已定时接收来自渲染器的消息:0.100

以前,在ChromeDriver v79.0 / Chrome中偶尔会观察到这些消息v79.0组合。



最小代码块:

 公共类chromeDemo 
{
public static void main(String [] args)
{
System.setProperty( webdriver.chrome.driver, C:\\Utility\ \\BrowserDrivers\\chromedriver.exe);
WebDriver驱动程序=新的C​​hromeDriver();
driver.get( https://www.google.com/);
driver.quit();
}
}

控制台输出:

 在端口9194上启动ChromeDriver 80.0.3987.16(320f6526c1632ad4f205ebce69b99a062ed78647-refs / branch-heads / 3987 @ {#185})
仅允许本地连接。
请保护ChromeDriver和相关测试框架使用的端口,以防止恶意代码访问。
2020年2月7日下午6:56:57 org.openqa.selenium.remote.ProtocolHandshake createSession
信息:检测到方言:W3C
[1581082019.282] [SEVERE]:超时从接收到消息渲染器:0.100
[1581082020.245] [SEVERE]:超时从渲染器接收消息:0.100
[1581082020.430] [SEVERE]:超时从渲染器接收消息:0.100
[1581082020.531] [SEVERE ]:超时接收来自渲染器的消息:0.100
[1581082020.632] [SEVERE]:超时接收来自渲染器的消息:0.100
[1581082020.734] [SEVERE]:超时接收来自渲染器的消息:0.100
[1581082020.835] [SEVERE]:超时接收来自渲染器的消息:0.100
[1581082021.364] [SEVERE]:超时接收来自渲染器的消息:0.100
[1581082021.544] [SEVERE]:超时接收来自渲染器的消息:0.100
[1581082021.647] [SEVERE]:超时从渲染器接收消息:0.100
[1581082021.748] [SEVERE]:超时从渲染器接收消息:0.100
[1581082021.850] [SEVERE]:超时从渲染器接收消息:0.100
[1581082021.952]:超时从渲染器接收消息:0.100

有人面对相同吗?
ChromeDriver / Chrome v80相对于ChromeDriver / Chrome v79是否有变化?有任何线索吗?

解决方案

临时解决方案



以下是解决方案 Chrome 用户的不同变体。




We recently upgraded our test environment with ChromeDriver v80.0.3987.16 and Chrome v80.0.3987.87 (Official Build) (64-bit) and after the upgradation even the minimal program is producing a lot of these SEVERE logs:

[1581082019.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100

Earlier these messages were observed occasionally till with ChromeDriver v79.0 / Chrome v79.0 combo.

Minimal Code Block:

public class chromeDemo 
{
    public static void main(String[] args) 
    {
            System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
            WebDriver driver =  new ChromeDriver();
            driver.get("https://www.google.com/");
            driver.quit();
    }
}

Console Output:

Starting ChromeDriver 80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}) on port 9194
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Feb 07, 2020 6:56:57 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[1581082019.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.430][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.531][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.632][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.734][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.835][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.364][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.544][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.647][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.748][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.850][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.952][SEVERE]: Timed out receiving message from renderer: 0.100

Anyone facing the same? Was there any change in ChromeDriver/Chrome v80 with respect to ChromeDriver/Chrome v79? Any clues?

解决方案

Interim solution

Here are the solutions for different variants of Chrome users.

  • If you are using Chrome v80, using the recently released ChromeDriver 80.0.3987.106 solves the issue.

    • Code Block:

      System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
      WebDriver driver =  new ChromeDriver();
      driver.quit();
      

    • Console Output:

      Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 20041
      Only local connections are allowed.
      Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
      Feb 14, 2020 9:50:57 PM org.openqa.selenium.remote.ProtocolHandshake createSession
      INFO: Detected dialect: W3C
      

  • If you are using Chrome v81, using the recently released ChromeDriver 81.0.4044.20 solves the issue.

  • If you are using Chrome from Dev or Canary channel you need to pickup the platform specific binaries:

Permanent Solution

However, @bugdroid submitted the actual fix through this revision / commit which is as follows:

[ChromeDriver] suppress logging of retry loop timeout: r1924789 added a retry loop while waiting for DevTools messages. This spammed users' logs with uninformative timeout reports. This CL suppresses those log messages and correctly reports the command timeout value when appropriate.

Note:

  • Status: Fixed
  • Labels: ToBeReleased ChromeDriver-82


History

This error message...

[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100

...does not necessarily indicate a failure.

As @Tricia mentions that, ChromeDriver Version 80 modified a wait loop to allow more retries; this loop will generate that message, but it continues to listen. However the SEVERE tag for that message is misleading.

Further, in the discussion Issue 3332: Retry timeout logged as severe, @triciac [ChromeDriver Committer] also added that, ChromeDriver team added a small timeout (100 ms) to DevToolsClientImpl::HandleEventsUntil to enable additional checking of navigation status. But, unfortunately when this timeout was expiring, it is logged as SEVERE (by ProcessNextMessage). In the case of this small timeout, it should not log as SEVERE, although timeouts from SendCommandInternal still should.

So ChromeDriver needs a way to control the logging in a better way, possibly by increasing the timeout. However, if the command finally times out, the timeout duration listed being very small, then it is needed to list the user-defined timeout instead.


Immediate solution

As an interim solution, you can downgrade to ChromeDriver v79.0.3945.36 as it seems the SEVERE logs doesn't shows up in the console but you will observe the WARNING:

[WARNING]: This version of ChromeDriver has not been tested with Chrome version 80

which sounds like a ...safe workaround... and had been confirmed by a Chromium team member.

  • Code Block:

    public class A_Chrome 
    {
        public static void main(String[] args) 
        {
            System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
            WebDriver driver =  new ChromeDriver();
            driver.get("https://www.google.com/");
            driver.quit();
        }
    }
    

  • Console Output:

    Starting ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614}) on port 9200
    Only local connections are allowed.
    Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
    [1581503845.444][WARNING]: This version of ChromeDriver has not been tested with Chrome version 80.
    Feb 12, 2020 4:07:26 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: W3C
    


tl; dr

You can find a couple of relevant discussions in:

这篇关于超时从渲染器接收消息:使用ChromeDriver和Chrome v80通过Selenium Java接收0.100条日志消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆