0

First of all, I want to say that I already read / applied all fixes listed on StackOverflow related to the same question and they do not work in my case, that's why I opened up a new one.

I am using selenium grid (4.0) with a chrome node (docker containers)

I am doing some screen captures on some sites, and running everything using Behat

Everything is fine, until I get to one page that is really big in height, and I want to capture the mobile version of it (which ends up being 120.000px in height)

That's when I see the following error in logs:

capture-service-chrome | [1648642983.839][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648642983.843][WARNING]: screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000

I've already added everything I possible could in my Behat file

            idleTimeout: 20000
            pageLoadStrategy: none
            timeouts: {implicit: 20000, pageLoad: 20000, script: 20000}
            chromeOptions:
              args:
                - "--no-sandbox"
                - "--headless"
                - "--disable-gpu"
                - "--disable-dev-shm-usage"
                - "--no-proxy-server"
                - "--disable-extensions"
                - "--dns-prefetch-disable"
                - "--force-device-scale-factor=1"
                - "--disable-infobars"
                - "--disable-browser-side-navigation"
                - "--disable-setuid-sandbox"
                - "--window-size=1920,1080"
                - "--log-level=3"
                - "enable-features=NetworkServiceInProcess"
                - "disable-features=NetworkService"

The versions that I am using are: browserVersion: 93.0.4577.82, chrome: {chromedriverVersion: 93.0.4577.82)

I really dont see what else I can do. The same page is captured properly on desktop (eg bigger width, smaller height), but when I try to capture using mobile resolution (320xHEIGHT) .. it crashes

I know the problem comes from the height, resizing the browser takes some time or something, but is there a way to fix it?

P.S: something weird that I've noticed, is that if I try to capture a page that is 1400x10.000 lets say, and I force it to 1400x120.000, it captures it (adding blank space at the bottom of course), but I get an image with 120k px in height at least ... so what's wrong when capturing a smaller width?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Scobee
  • 448
  • 7
  • 22

1 Answers1

-1

This error message...

capture-service-chrome | [1648642983.839][SEVERE]: Timed out receiving message from renderer: 10.000
capture-service-chrome | [1648642983.843][WARNING]: screenshot failed, retrying timeout: Timed out receiving message from renderer: 10.000

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e.


Reason

Though you are using Selenium v4.0 but

  • ChromeDriver version is 93.0.4577.82
  • Google-chrome version is 93.0.4577.82

which are very old and ancient with respect to the current Selenium version of 4.0


Solution

Ensure that:


References

You can find a couple of relevant detailed discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Thank you for the detailed solution! Unfortunately, the problem still persists. I've upgraded to: ChromeDriver 100.0.4896.60, Google Chrome 100.0.4896.60, Started Selenium Standalone 4.1.3, and I still have the exact same error. As I've said, something is weird, since I load the page, do a capture for 1400x30864 and it works, then resize to 320x112000 and when I try to do a capture it times out (while executing ->getScreenshot()). The weird thing is that if I resize to 1400x112000 (this means that after the 30864px I'll have just white space), I can capture it .. but not 320x112000px – Scobee Mar 31 '22 at 07:46