6

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);
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Sai
  • 389
  • 6
  • 18
  • I’m honestly not sure if that’s your script or the error message. Could you upload both please and clarify? – C. Peck Mar 27 '19 at 09:32
  • My Error message is [1553677874.187][SEVERE]: Timed out receiving message from renderer: 600.000. – Sai Mar 27 '19 at 10:42

3 Answers3

7

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:

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");
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • HI Debnajan , I am getting same error after i downgraded the version as you suggested. but if i run the jenkin build as without windows service it is working fine – Sai Mar 27 '19 at 10:50
  • Hi Debanjan,As you suggested I have reinstalled my JDK to jdk1.8.0_201. I upgraded my chrome driver version to 2.45 and chrome version as Version 71.0.3578.80. it is working fine in the Eclipse and jenkins without windows service. when i install windows as service and execute the testcase the browser is not launching . I am facing the problem with windows as service in jenkins with above combination also – Sai Mar 27 '19 at 13:23
  • Thanks for the update. Your and @thab update have helped us to dig out the main issue. I have updated the answer. Let me know the status. – undetected Selenium Mar 27 '19 at 19:26
  • 1
    Thank you so much for providing the solution – Sai Mar 28 '19 at 14:22
  • 1
    I think you're right (I separately found the same underlying issue - it just doesn't work with Chrome v73 as a background service). You mention downgrading - how did you do that? – thab Mar 28 '19 at 14:30
  • @thab I have provided the screenshot of my conversation with John Chen (owner of ChromeDriver project). You can be **rest assured**. – undetected Selenium Mar 28 '19 at 14:32
  • 2
    @DebanjanB - do you have Chrome downgrading instructions somewhere though? – thab Mar 28 '19 at 14:35
  • 1
    @thab Updated answer with a link for your reference – undetected Selenium Mar 28 '19 at 15:01
  • Hi @DebanjanB , if we install chrome browser as a offline installer where we can find the binary path of the chrome .because jenkin says that not able to find the chrome binary path – Sai Mar 29 '19 at 09:54
  • @Vijayakumarj Check the third link in `Outro` section. – undetected Selenium Mar 29 '19 at 09:55
  • 1
    Hi Debanjan. As you suggested I have added the stmt in the chrome option . it is working fine. Thank you so much for the update – Sai Apr 03 '19 at 14:38
  • @Sai You meant `--disable-features=VizDisplayCompositor`? – undetected Selenium Apr 03 '19 at 14:42
  • 1
    Yes Debanjan i added --disable-features=VizDisplayCompositor – Sai Apr 03 '19 at 14:45
  • few times it shows timeout and retring message but when it retries it continues the execution without breaking the build – Sai Apr 03 '19 at 14:49
0

Possible problem is that your Google Chrome updated and became incompatible with your Chromedriver. I suggest either getting a new Chromedriver or downgrading your Google Chrome to a previous version and disabling auto updates.

You can verify the required Chromedriver version for your Google Chrome here: http://chromedriver.chromium.org/downloads

Step 4 of the following link worked for me to disable automatic google Chrome updates. https://www.webnots.com/7-ways-to-disable-automatic-chrome-update-in-windows-and-mac/

Remy
  • 150
  • 9
0

Add below property(1) before ChromeDriver initialization

  1. System.setProperty("webdriver.chrome.silentOutput", "true");

driver = new ChromeDriver();

Vasista TVN
  • 285
  • 3
  • 6