从渲染器接收消息超时:600.000 当我们使用 Jenkins windows 服务模式执行 selenium 脚本时 [英] Getting Timed out receiving message from renderer: 600.000 When we execute selenium scripts using Jenkins windows service mode

查看:31
本文介绍了从渲染器接收消息超时:600.000 当我们使用 Jenkins windows 服务模式执行 selenium 脚本时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们每天都在使用 jenkins 窗口服务(无头模式)执行我们的 selenium 自动化脚本.它一直工作到昨天.突然它停止工作并且没有启动浏览器.它显示了以下错误消息 [15536​​77874.187][SEVERE]:从渲染器接收消息超时:600.000.之后所有剩余的测试用例都失败了.

如果我们在没有 Windows 服务的情况下使用 jenkins 运行构建,它工作正常.我们仅在 Windows 即服务中遇到此问题

  • 我的 chrome 驱动程序版本:73.0.3683.68
  • Chrome 浏览器版本:73.0.3683.68
  • 硒版本:3.14.0

我尝试降级浏览器版本和驱动程序版本.即使它不起作用

当我们使用 jenkins 作为 Windows 服务执行但收到错误消息时,我希望浏览器应该在后台启动.

System.setProperty("webdriver.chrome.driver", "C:\chromedriver.exe");ChromeOptions options = new ChromeOptions();options.addArguments("load-extension=C:\1.13.4_0");options.addArguments("--start-maximized");options.addArguments("--ignore-certificate-errors");options.addArguments("--disable-popup-blocking");//options.addArguments("window-size=1400,600");options.addArguments("启用自动化");options.addArguments("--headless");options.addArguments("--window-size=1920,1080");options.addArguments("--no-sandbox");//options.addArguments("--disable-extensions");options.addArguments("--dns-prefetch-disable");options.addArguments("--disable-gpu");options.setPageLoadStrategy(PageLoadStrategy.NORMAL);DesiredCapabilities 能力 =DesiredCapabilities.chrome();能力.setCapability(ChromeOptions.CAPABILITY,**强文本**选项);返回新的 ChromeDriver(功能);

解决方案

看来您正在使用以下配置:

  • chromedriver=73.0.3683.68
  • chrome=73.0.3683.68
  • Windows 操作系统
<小时>

John Chen(所有者 - chromedriver)最近证实,

<块引用>

当 Chrome 73.0.3686.75 由 Windows 上的服务(例如 Jenkins 或任务调度程序)启动时,我们已确认截屏问题.请参阅

<小时>

昨天(2019 年 3 月 26 日),约翰再次确认:

<块引用>

我知道从 Jenkins 运行 Chrome 73 时存在一些问题.我不知道任何解决方法.请关注

<小时>

更新

我们能够挖掘出主要问题.主要问题不在于 ChromeDriver v73.x 本身,而是 Chrome v73.x 和 John 正式确认为:

<块引用>

根本原因确实在 Chrome 73.x 中,而不是在 ChromeDriver 中.我们正在与 Chrome 开发者合作寻找解决方案.

<小时>

解决方案

快速修复解决方案是:

<块引用>

注意:如果您使用的是 Chrome 72 版本,请下载 ChromeDriver 2.46 或 ChromeDriver 72.0.3626.69

<小时>

尾声

您可以在以下位置找到相关讨论:

<小时>

更新(2019 年 4 月 3 日)

通过 ChromeOptions() 的实例添加参数 --disable-features=VizDisplayCompositor 似乎解决了这个问题:

ChromeOptions options = new ChromeOptions();options.addArguments("--disable-features=VizDisplayCompositor");WebDriver driver = new ChromeDriver(options);driver.get("https://google.com");

We are executing our selenium automation script using jenkins window service(Headless mode) on daily basis .it was working fine till yesterday. suddenly it stopped working and not launching the browser. it shows the below error message [1553677874.187][SEVERE]: Timed out receiving message from renderer: 600.000. after that all the remaining test cases are getting failed.

It is working fine if we run the build using jenkins as without windows service. We are experiencing this issue only with windows as service

  • My chrome driver version :73.0.3683.68
  • Chrome browser version :73.0.3683.68
  • Selenium Version :3.14.0

I have tried to downgrade the browser version and driver version. even though it is not working

I am expecting the browser should launch in the background when we execute using jenkins as windows service but getting error message.

System.setProperty("webdriver.chrome.driver", "C:\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("load-extension=C:\1.13.4_0");
options.addArguments("--start-maximized");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-popup-blocking");
// options.addArguments("window-size=1400,600");
options.addArguments("enable-automation");
options.addArguments("--headless");
options.addArguments("--window-size=1920,1080");
options.addArguments("--no-sandbox");
// options.addArguments("--disable-extensions");
options.addArguments("--dns-prefetch-disable");
options.addArguments("--disable-gpu");
options.setPageLoadStrategy(PageLoadStrategy.NORMAL);
DesiredCapabilities capabilities = 
DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY, 
**strong text**options);
return new ChromeDriver(capabilities);

解决方案

Seems you are using the following configuration:

  • chromedriver=73.0.3683.68
  • chrome=73.0.3683.68
  • Windows OS

John Chen (Owner - chromedriver) recently have confirmed that,

We have confirmed issues with take screenshot when Chrome 73.0.3686.75 is started by a service (such as Jenkins or Task scheduler) on Windows. Please see https://crbug.com/942023 for more details. We apologize for any inconvenience caused by this. However, we haven't yet been able to observe similar issue on Linux, so we appreciate any help you can provide to enable us to reproduce the issue on Linux. We don't have access to TeamCity, but we have tested take screenshot using Docker image produced by Selenium (selenium/standalone-chrome:3.141.59-lithium), and didn't find any problems.


Yesterday (Mar 26, 2019), John once again confirmed:

I am aware of some issues with running Chrome 73 from Jenkins. I don't know any workarounds. Please following https://crbug.com/942023 for updates.


Update

We were able to dig up the main issue. The main issue is not with ChromeDriver v73.x as such but with Chrome v73.x and John officially confirms it as:

The root cause is indeed in Chrome 73.x, not in ChromeDriver. We are working with Chrome devs to find a solution.


Solution

A quick fix solution will be to:

Note: If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69

  • Ensure that JDK is upgraded to recent level of JDK 8u202.

Outro

You can find the relevant discussions in:


Update(03-April-2019)

Adding the argument --disable-features=VizDisplayCompositor through an instance of ChromeOptions() seems solves the issue:

ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-features=VizDisplayCompositor");
WebDriver driver = new ChromeDriver(options);
driver.get("https://google.com");

这篇关于从渲染器接收消息超时:600.000 当我们使用 Jenkins windows 服务模式执行 selenium 脚本时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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