48

We recently upgraded our test environment with ChromeDriver v80.0.3987.16 and Chrome v80.0.3987.87 (Official Build) (64-bit) and after the upgradation even the minimal program is producing a lot of these SEVERE logs:

[1581082019.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100

Earlier these messages were observed occasionally till with ChromeDriver v79.0 / Chrome v79.0 combo.

Minimal Code Block:

public class chromeDemo 
{
    public static void main(String[] args) 
    {
            System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
            WebDriver driver =  new ChromeDriver();
            driver.get("https://www.google.com/");
            driver.quit();
    }
}

Console Output:

Starting ChromeDriver 80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}) on port 9194
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Feb 07, 2020 6:56:57 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
[1581082019.282][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.430][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.531][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.632][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.734][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082020.835][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.364][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.544][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.647][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.748][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.850][SEVERE]: Timed out receiving message from renderer: 0.100
[1581082021.952][SEVERE]: Timed out receiving message from renderer: 0.100

Anyone facing the same? Was there any change in ChromeDriver/Chrome v80 with respect to ChromeDriver/Chrome v79? Any clues?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 7
    I'm also facing the same issue :( – Sooraj Feb 07 '20 at 14:25
  • 9
    I'm getting the same issue once we upgraded to v80. Though, your question should probably ask how to fix it, rather than asking if anyone else is facing the same problem. – Taplar Feb 07 '20 at 23:13
  • 4
    I can't believe this question has been closed. Many times SO fails as the engine to help. – Saeed Neamati Feb 08 '20 at 15:51
  • 4
    Facing the exactly same issue. All of our automated Selenium code is broken. And we can't downgrade because of a lot of complexities. – Saeed Neamati Feb 08 '20 at 15:54
  • @DebanjanB You can try my solution whenever you are free. – Muzzamil Feb 10 '20 at 08:25
  • @Muzzamil Thanks for the answer. Actually, the error effects some high end functionalities and the error comes due to a mess up by ChromeDriver team while releasing _ChromeDriver v80_. See [this](https://stackoverflow.com/questions/60114639/timed-out-receiving-message-from-renderer-0-100-log-messages-using-chromedriver/60140212#60140212). We had been recommending `PageLoadStrategy.NONE` for scraping but won't be a good idea when testing applications. – undetected Selenium Feb 10 '20 at 08:34
  • 2
    @DebanjanB Yes I went through your post. I hope they can fix it in next release. I tried to find out the solution so I have mentioned it but there is more options to prevent timeout. I will try it with other option but if timeout duration is very less then I think we need to wait for next release. – Muzzamil Feb 10 '20 at 10:01
  • 1
    Oh my God! I thought the problem was connected with my tests somehow. Spent awful lot of time trying to solve this. Such a relief to find out that I'm not the only one facing this issue. Thank you @DebanjanB for creating this question. – Cute Shark Feb 10 '20 at 14:39
  • I am also facing this issue. It started after adding Chrome v80 to my Project. Please, let's know the best way around this aside from having to downgrade the version of Chrome. – Seunara Feb 19 '20 at 14:02
  • @DebanjanB - I have ChromeDriver 80.0.3987.106. I still face the issue. But, my automation scripts are working fine. – MasterJoe Mar 14 '20 at 00:37
  • 2
    Still fails with ChromeDriver + Chrome 81. And workaround also doesn't work since ChromeDriver 79 is not compatible with Chrome 81. – whydoieven Apr 12 '20 at 12:23
  • Hi @DebanjanB is this bug fixed? – BCPNAYAK Apr 23 '20 at 13:21
  • The bug seems that will be fixed in Chromedriver 83 (May19 for Chrome83 availability) https://bugs.chromium.org/p/chromedriver/issues/detail?id=3332&sort=-id&q=&can=1 – Jorge Muñoz Apr 27 '20 at 10:37
  • Dear @undetected Selenium can you look at my question? your vast knowledge can solve my [issue ](https://stackoverflow.com/questions/74528243/using-javascript-in-selenium-command-is-revoked-by-windows-security-settings) better – RF1991 Nov 24 '22 at 05:53

4 Answers4

25

Interim solution

Here are the solutions for different variants of Chrome users.

  • If you are using Chrome v80, using the recently released ChromeDriver 80.0.3987.106 solves the issue.

    • Code Block:

      System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
      WebDriver driver =  new ChromeDriver();
      driver.quit();
      
    • Console Output:

      Starting ChromeDriver 80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}) on port 20041
      Only local connections are allowed.
      Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
      Feb 14, 2020 9:50:57 PM org.openqa.selenium.remote.ProtocolHandshake createSession
      INFO: Detected dialect: W3C
      
  • If you are using Chrome v81, using the recently released ChromeDriver 81.0.4044.20 solves the issue.

  • If you are using Chrome from Dev or Canary channel you need to pickup the platform specific binaries:

Permanent Solution

However, @bugdroid submitted the actual fix through this revision / commit which is as follows:

[ChromeDriver] suppress logging of retry loop timeout: r1924789 added a retry loop while waiting for DevTools messages. This spammed users' logs with uninformative timeout reports. This CL suppresses those log messages and correctly reports the command timeout value when appropriate.

Note:

  • Status: Fixed
  • Labels: ToBeReleased ChromeDriver-82

History

This error message...

[1581082020.245][SEVERE]: Timed out receiving message from renderer: 0.100

...does not necessarily indicate a failure.

As @Tricia mentions that, ChromeDriver Version 80 modified a wait loop to allow more retries; this loop will generate that message, but it continues to listen. However the SEVERE tag for that message is misleading.

Further, in the discussion Issue 3332: Retry timeout logged as severe, @triciac [ChromeDriver Committer] also added that, ChromeDriver team added a small timeout (100 ms) to DevToolsClientImpl::HandleEventsUntil to enable additional checking of navigation status. But, unfortunately when this timeout was expiring, it is logged as SEVERE (by ProcessNextMessage). In the case of this small timeout, it should not log as SEVERE, although timeouts from SendCommandInternal still should.

So ChromeDriver needs a way to control the logging in a better way, possibly by increasing the timeout. However, if the command finally times out, the timeout duration listed being very small, then it is needed to list the user-defined timeout instead.


Immediate solution

As an interim solution, you can downgrade to ChromeDriver v79.0.3945.36 as it seems the SEVERE logs doesn't shows up in the console but you will observe the WARNING:

[WARNING]: This version of ChromeDriver has not been tested with Chrome version 80

which sounds like a ...safe workaround... and had been confirmed by a Chromium team member.

chromedriver79

  • Code Block:

    public class A_Chrome 
    {
        public static void main(String[] args) 
        {
            System.setProperty("webdriver.chrome.driver", "C:\\Utility\\BrowserDrivers\\chromedriver.exe");
            WebDriver driver =  new ChromeDriver();
            driver.get("https://www.google.com/");
            driver.quit();
        }
    }
    
  • Console Output:

    Starting ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945@{#614}) on port 9200
    Only local connections are allowed.
    Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
    [1581503845.444][WARNING]: This version of ChromeDriver has not been tested with Chrome version 80.
    Feb 12, 2020 4:07:26 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: W3C
    

tl; dr

You can find a couple of relevant discussions in:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 1
    Also be aware that this log message appears to be written to stderror. I had a PowerShell script start failing after running tests using `vstest.console.exe` because the PowerShell `$?` variable was `$false` even though the tests passed. PowerShell seems to think anything being written to stderror is a failure, even though the `$LastExitCode` for the test runner returned zero. – Greg Burghardt Feb 12 '20 at 17:56
  • 4
    Re: Chrome v80, using the recently released ChromeDriver 80.0.3987.106 solves the issue. Re: Chrome v81, using the recently released ChromeDriver 81.0.4044.20 solves the issue. I am still seeing the issue with the ChromeDirver updates. – Neil Feb 29 '20 at 08:40
  • 1
    Yes!!!!!ChromeDriver v79 win32 is working fine with chrome v80.0.3987.132 and not giving TimedOut error in console. But sometimes Chromedriver is failed to start the server. – Surodip Mar 06 '20 at 06:39
  • 1
    Using chromedriver v79 workaround is no longer working with latest version of stable chrome (81.0.4044.92) with driver being unable to even open chrome. I upgraded chromedriver to latest and it works, but the severe timeout errors have returned. – PST Apr 11 '20 at 16:47
  • @PST - exact same problems. this is frustrating. – whydoieven Apr 12 '20 at 12:24
  • I tried downloading 81.0.4044.20 and 81.0.4044.69 for the Mac to fix this problem. Neither resolved it. Am I missing something here? – Doug Noel May 06 '20 at 20:21
16

Root cause: Whenever you are loading some page with the help of selenium driver,  then driver script wait till page is completely loaded. But sometimes webdriver takes more time to load a page, in that case, you will see the TimeoutException exception in your console.

Solution: When Page Loading takes too much time and you need to stop downloading additional subresources (images, CSS, js, etc) you can change the pageLoadStrategy through the webdriver.

Below code just load the html content from page. You can set page load strategy from chromeoptions

ChromeOptions options = new ChromeOptions();
options.setPageLoadStrategy(PageLoadStrategy.NONE);

Updated Solution -2: I agree with DebanjanB, PageLoad strategy with None, without download additional files (images, CSS, js, etc) is not a good idea while performing testing. I did search for all issues about it and try to find a valid solution. I tried the below options as sometimes at some point it was able to resolve this issue.

    options.addArguments("start-maximized"); 
    options.addArguments("enable-automation"); 
    options.addArguments("--no-sandbox"); 
    options.addArguments("--disable-infobars"); 
    options.addArguments("--disable-dev-shm-usage"); 
    options.addArguments("--disable-browser-side-navigation"); 
    options.addArguments("--disable-gpu");

None of them helped But I found one solution again with the Page load strategy. This time we are downloading all subresources but we are waiting for the DOMContentLoaded event. This strategy called Eager. A small definition of available all 3 pageload strategies

1. normal: This strategy causes Selenium to wait for the full page loading (HTML content and sub-resources downloaded and parsed).

2. eager: This strategy causes Selenium to wait for the DOMContentLoaded event (HTML content downloaded and parsed only).

3. none : This strategy causes Selenium to return immediately after the initial page content is fully received (HTML content downloaded).

NOTE: By default, when Selenium loads a page, it follows the normal pageLoadStrategy.

Code snippet without using Pageload strategy (Or Normal as used by selenium by default)

System.setProperty("webdriver.chrome.driver", "C:\\Users\\...\\LatestDriver\\chromedriver.exe");   
WebDriver driver=new ChromeDriver();
driver.get("http://www.google.com");
driver.manage().window().maximize();
WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement el = wait.until(ExpectedConditions.elementToBeClickable(By.name("q")));
el.click();
List <WebElement> allLinks = driver.findElements(By.tagName("a"));
System.out.println(allLinks.size());
driver.quit();

Console Output:

Starting ChromeDriver 80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}) on port 41540 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. Feb 11, 2020 10:22:12 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C [1581412933.937][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.066][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.168][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.360][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.461][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.618][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.719][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.820][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412934.922][SEVERE]: Timed out receiving message from renderer: 0.100 [1581412935.097][SEVERE]: Timed out receiving message from renderer: 0.100 21

With PageLoad Strategy - Eager :

Code Snippet:

System.setProperty("webdriver.chrome.driver", "C:\\Users\\...\\LatestDriver\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.setPageLoadStrategy(PageLoadStrategy.EAGER);
WebDriver driver=new ChromeDriver(options);
driver.get("http://www.google.com");
driver.manage().window().maximize();
WebDriverWait wait = new WebDriverWait(driver, 20);
WebElement el = wait.until(ExpectedConditions.elementToBeClickable(By.name("q")));
el.click();
List <WebElement> allLinks = driver.findElements(By.tagName("a"));
System.out.println(allLinks.size());
driver.quit();

Console Output:

Starting ChromeDriver 80.0.3987.16 (320f6526c1632ad4f205ebce69b99a062ed78647-refs/branch-heads/3987@{#185}) on port 1175 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. Feb 11, 2020 10:29:05 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C
21

Norayr Sargsyan
  • 1,737
  • 1
  • 12
  • 26
Muzzamil
  • 2,823
  • 2
  • 11
  • 23
  • Generally you won't be able to tweak the PageLoad Strategy as the WebDriver configurations are standardized and best fit to the required test strategy. However, in the discussions [How to make Selenium not wait till full page load](https://stackoverflow.com/questions/44770796/how-to-make-selenium-not-wait-till-full-page-load-which-has-a-slow-script/44771628#44771628), [Don't wait for a page to load](https://stackoverflow.com/questions/46322165/dont-wait-for-a-page-to-load-using-selenium-in-python/46339092#46339092) we have discussed it in details. It's an issue with ChromeDriver v80. – undetected Selenium Feb 11 '20 at 11:24
  • 3
    @DebanjanB I am agree with you but as you know SO is the community about to solve issues. I tried whatever best possible solution is available. If you know it is **ISSUE** or **BUG** in chrome driver then we have to Log this issue on their Git project or recommended place. Raising question in SO will not help. – Muzzamil Feb 11 '20 at 13:48
  • I have recently updated my chrome and chromedriver, and then started getting all these warning messages. Now I am trying to downgrade my chrome and can't find where to get the chrome 79v. Can someone provide me the link to download chrome 79v – Vin Apr 14 '20 at 18:54
  • @Vin here you can download https://chromedriver.chromium.org/downloads – Muzzamil Apr 14 '20 at 19:12
0

Use this line of code keep the code first statement

System.setProperty(ChromeDriverService.CHROME_DRIVER_SILENT_OUTPUT_PROPERTY, "true");

If you don't go for Leanthy

System.setProperty("webdriver.chrome.silentOutput", "true");
mechnicov
  • 12,025
  • 4
  • 33
  • 56
-3

I used to have the same problem with the chrome driver in version 81.0.4044.13800 used in a C# project in combination with selenium. Updates to a newer version of the driver did not work for me as well as further startup arguments.

But since this is a logging problem, here is the final solution which works for me as described here:

ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArguments(new List<string>() 
{ 
  "no-sandbox", 
  "headless", 
  "disable-gpu" 
});

ChromeDriverService service = ChromeDriverService.CreateDefaultService();
service.SuppressInitialDiagnosticInformation = true;

var driver = new ChromeDriver(service, chromeOptions);
CodeMonga
  • 105
  • 1
  • 7