After Chrome released their newest version yesterday (64.0.3282), I am now receiving this error rather sporadically:
Timed out receiving message from renderer: 600.000
I'm running about 2,000 selenium tests within a docker container and I see this failure at a rate of about 1 in 100. There are no reproducible steps as far as I can tell- the tests that fail are different with each iteration. I updated to the newest Chromedriver (2.35), but that didn't seem to have any effect. I was previously using Selenium 2.41, but have updated to the newest version (3.8.1) hoping that it might help... it did not. I'm completely at a loss as to why this might be occurring. Has anyone else noticed this? Is it possibly a bug with Chrome's newest release?
Thank you in advance for any help you may be able to provide.
In Selenium, TimeOut exception occurs when a command takes longer than the wait time to avoid the ElementNotVisible Exception. If the commands do not complete even after the wait time is over, a TimeOut Exception is thrown.
pageLoadTimeout in Selenium This sets the time to wait for a page to load completely before throwing an error. If the timeout is negative, page loads can be indefinite.
This defines the amount of time that Selenium will wait for a page to load. By default, it is set to 0 (which equates to an infinite time out). If you want to ensure that an error is thrown if your page takes longer than expected to load, you can modify this by using this line of code: driver.
First verify you aren't executing / eval()
ing a lot of javascript. That can cause a timeout.
First, verify your versions of:
Chrome
are all compatible. Good luck doing this because there is no single place that documents it, AND selenium software isn't smart enough to do a quick check (it should)
Add this cryptic block of code, what I like to call the "Ever Growing List of Useless Arguments" chromedriver requires
up to date from every issue ever reported on stack overflow as of: September 2018
// ChromeDriver is just AWFUL because every version or two it breaks unless you pass cryptic arguments //AGRESSIVE: options.setPageLoadStrategy(PageLoadStrategy.NONE); // https://www.skptricks.com/2018/08/timed-out-receiving-message-from-renderer-selenium.html options.addArguments("start-maximized"); // https://stackoverflow.com/a/26283818/1689770 options.addArguments("enable-automation"); // https://stackoverflow.com/a/43840128/1689770 options.addArguments("--headless"); // only if you are ACTUALLY running headless options.addArguments("--no-sandbox"); //https://stackoverflow.com/a/50725918/1689770 options.addArguments("--disable-infobars"); //https://stackoverflow.com/a/43840128/1689770 options.addArguments("--disable-dev-shm-usage"); //https://stackoverflow.com/a/50725918/1689770 options.addArguments("--disable-browser-side-navigation"); //https://stackoverflow.com/a/49123152/1689770 options.addArguments("--disable-gpu"); //https://stackoverflow.com/questions/51959986/how-to-solve-selenium-chromedriver-timed-out-receiving-message-from-renderer-exc driver = new ChromeDriver(options);
Sources:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With