Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Timed out receiving message from renderer: 600.000 When we execute selenium scripts using Jenkins windows service mode

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);
like image 995
Sai Avatar asked Mar 27 '19 09:03

Sai


1 Answers

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.

chromedriver73


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.

chromedriver73_and


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

A quick fix solution will be to:

  • Downgrade Chrome Browser to Chrome v72.x
  • Use a matching ChromeDriver among:
    • ChromeDriver 2.46
    • ChromeDriver 72.0.3626.69

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:

  • Page.captureScreenshot no longer works in Chrome 73 under Selenium as a Service on Windows
  • Error [SEVERE]: Timed out receiving message from renderer: 20.000 while executing the testsuite through Selenium on Jenkins
  • Download Google Chrome 72 Offline Installer For All Operating Systems

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");
like image 106
undetected Selenium Avatar answered Nov 06 '22 19:11

undetected Selenium