1

getting timeout exception

org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 10.000, screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000

on taking screenshot in headless mode chrome.

NOTE: screenshot working in normal chrome.

chrome browser version: 79.0.3945.117
the chrome driver version used: 79.0.3945.36
chrome options: 

    options.addArguments("--headless");
    options.addArguments("--no-sandbox");       
    options.addArguments("--no-gui");
    options.addArguments("--window-size=1980,960");

The screenshot was taken in normal mode, this exception only occurs in headless mode.

Vinothgopi
  • 11
  • 4
  • I also had similar problem. The problem with headless browsers are that they are very buggy right now. I am also curious to find out more about this issue. This website makes using Headless chrome really easy. https://www.0browser.com – Raha Jan 20 '20 at 05:21
  • 1
    Thanks @Raha for your suggestion, – Vinothgopi Jan 24 '20 at 12:07
  • @DebanjanB, I have already tried the mentioned suggestions in the links you have posted as answers and they are really not working. Kindly reopen this question. – Vinothgopi Jan 24 '20 at 12:08
  • @Vinothgopi Can you update the question with your code trials regarding what exactly you have tried from those duplicate targets? – undetected Selenium Jan 24 '20 at 12:11
  • @DebanjanB, I have tried with different chrome browser version and its corresponding drivers, I'm getting the same Timeout Exception on screenshot only in headless mode regardless of the version. Normally the screenshot is working in headless mode, but if I have opened another browser tab and opened a PDF url, and taking a screenshot of that pdf. I can't share the code as it is confidential. – Vinothgopi Jan 24 '20 at 12:17
  • @DebanjanB, also tried to increase the web page load timeout and time to wait but nothing works, do you know what may be the reason that causes the issue? – Vinothgopi Jan 24 '20 at 12:18
  • @DebanjanB, when I'm debugging the following line causing the exception and stucks with this line for long time. `File SrcFile=scrShot.getScreenshotAs(OutputType.FILE);` scrShot is a `TakesScreenshot` object cast from an `EventFiringWebDriver` – Vinothgopi Jan 24 '20 at 12:23

0 Answers0