Timed out receiving message from renderer: 10.000 while capturing screenshot using chromedriver and chrome through Jenkins on Windows Timed out receiving message from renderer: 10.000 while capturing screenshot using chromedriver and chrome through Jenkins on Windows selenium selenium

Timed out receiving message from renderer: 10.000 while capturing screenshot using chromedriver and chrome through Jenkins on Windows


Seems you are using chromedriver=73.0.3683.68 and chrome=73.0.3683.86 on 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.

chromedriver73


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.

chrome73_issue


Solution

The solution would be to:

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


Outro


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");


I had the same problem running the same version of Chrome / Chromedriver when running headless from a Team City build. This started after the latest update was installed on the build server on 25th March 2019.

The reason the screenshots were being taken in the first place, was that the tests had also started failing due to what I suspect is a related defect regarding virtual rendering in headless mode again limited to when the instance of Chrome is run via a service (TeamCity).

The tests all run fine when I run the build script from a command prompt on the build server VM.

I resolved the issue by downgrading the chrome version. Easier said than done:

  1. I couldn't find an official way to get hold of old versions of chrome, but I found this link which hosted some. Use at your own risk: https://www.slimjet.com/chrome/google-chrome-old-version.php

  2. I downloaded version Download version 71.0.3578.80

  3. Uninstall Chrome from build server, run this installer.

  4. As soon as the update directory is created during the install process:C:\Program Files (x86)\Google\Updaterename the file GoogleUpdate.exe to prevent it updating itself

  5. Disable the Google Chrome update tasks in Task Scheduler

UPDATE: An answer here suggests the problem can be fixed with some additional arguments passed to the chromedriver, I've not tested this solution:

https://sqa.stackexchange.com/a/38456/37816


I had the same problem and I did it work removing

 chromeOptions.addArguments("--window-size=1920,1080");

or using

 chromeOptions.addArguments("--window-size=1920,1080"); chromeOptions.addArguments("--force-device-scale-factor=1");