1

I am using Selenium 3.14.0 with Java to automate my tests. Until yesterday(25Mar 2018) , everything was up and running fine.In case of any failures , screenshots were taken and embedded successfully. This morning however the script started crashing with following error.

[1553593587.996][SEVERE]: Timed out receiving message from renderer: 10.000 [1553593587.997][WARNING]: screenshot failed, retrying [1553593597.997][SEVERE]: Timed out receiving message from renderer: 10.000 [1553593608.000][SEVERE]: Timed out receiving message from renderer: 10.000 [1553593608.000][WARNING]: screenshot failed, retrying [1553593618.000][SEVERE]: Timed out receiving message from renderer: 10.000 [1553593628.004][SEVERE]: Timed out receiving message from renderer: 10.000 [1553593628.004][WARNING]: screenshot failed, retrying [1553593638.004][SEVERE]: Timed out receiving message from renderer: 10.000 timeout: Timed out receiving message from renderer: 10.000

I am using

headless chrome=73.0.3683.86 and chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 6.3.9600 x86_64)

Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 73.0.3683.68 (47787ec04b6e3..., userDataDir: C:\Users\Jenkins\AppData\Lo...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:3956}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: none, platform: XP, platformName: XP, proxy: Proxy(), rotatable: false, setWindowRect: true, strictFileInteractability: false, takesHeapSnapshot: true, takesScreenshot: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 73.0.3683.86, webStorageEnabled: true} Session ID: 95fc01b26bcafb4607a4760ef58a8930 Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72)

In order to resolve this , I tried adding varios paramters to options such as :-

options.addArguments("--disable-browser-side-navigation" ); options.setPageLoadStrategy(PageLoadStrategy.NONE);

but none of it resolved timeout issue.

I really appreciate an advise on how can I resolve this issue.

2
  • Is this reproducible in different environments, but some browser configuration> Commented Mar 26, 2019 at 10:52
  • I am running it only on one environment which is the jenkins server. but when I run it locally on Windows 10 Chrome brower then I dont see this issue.
    – Sjain
    Commented Mar 26, 2019 at 11:42

4 Answers 4

0

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(04-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");
1
  • Sir, I am using version 75 for both chrome and chromebinary and using following chrome options in serenity.properties file lie this chrome.switches="--test-type,disable-features=VizDisplayCompositor,acceptInsecureCerts=true,--disable-web-security,--ignore-certificate-errors,--allow-running-insecure-content,--allow-insecure-localhost,--whitelisted-ips='',--disable-infobars,--disable-gpu,--verbose", but it is still giving this error. Please give your suggestion.I'll really appreciate, thanks.
    – paul
    Commented Jul 18, 2019 at 15:32
0

Add:

options.addArguments("disable-gpu");

Previously raised in: https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc

2
  • Used all the following options but still have the same issue :- options.addArguments("--disable-gpu"); options.addArguments("--disable-extensions"); options.setExperimentalOption("useAutomationExtension", false); options.addArguments("--proxy-server='direct://'"); options.addArguments("--proxy-bypass-list=*"); options.addArguments("--start-maximized"); options.addArguments("--headless"); options.addArguments("--disable-browser-side-navigation" ); options.setPageLoadStrategy(PageLoadStrategy.NONE);
    – Sjain
    Commented Mar 26, 2019 at 11:43
  • In that case take a look at sqa.stackexchange.com/questions/9007/…. Main points are that it can be caused by version mismatch between Chrome and Chromedriver or by timeouts rendering the page (usually by 3rd party plugins). So increase / disable driver.manage().timeouts().pageLoadTimeout(timeoutValue, TimeUnit.SECONDS);
    – Klynt
    Commented Mar 26, 2019 at 11:55
0

Using combination of following options resolved my timeout issue :-

options.addArguments("--incognito"); options.addArguments("enable-automation"); options.addArguments("--headless"); options.addArguments("--no-sandbox"); options.addArguments("--window-size=1920,1080"); options.addArguments("--disable-gpu"); options.addArguments("--disable-extensions"); options.addArguments("--dns-prefetch-disable"); options.setPageLoadStrategy(PageLoadStrategy.NORMAL);

0

I had the same problem on the same date and the problem was caused by a bug in the lastest version of chrome that only manifests when the chrome instance is opened from a service (such as a build server like Team City).

I resolved the issue by downgrading to an older version of chrome, but if this can be fixed with arguments, this is a better solution.

See here for more information:

https://bugs.chromium.org/p/chromedriver/issues/detail?id=848

https://stackoverflow.com/questions/55364056/timed-out-receiving-message-from-renderer-10-000-while-capturing-screenshot-usi/55379488#55379488

Not the answer you're looking for? Browse other questions tagged or ask your own question.