Reputation: 1786
I have an error with clicks that hard to reproduce. 1-2/10000 clicks ends with OpenQA.Selenium.WebDriverTimeoutException
.
It looks like element was not clicked and driver waits for some reaction.
Message: timeout: cannot determine loading status
from timeout: Timed out receiving message from renderer: -0.028
(Session info: chrome=52.0.2743.116)
(Driver info: chromedriver=2.22.397933 (1cab651507b88dec79b2b2a22d1943c01833cc1b),platform=Windows NT 6.3.9600 x86_64)
Stack trace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.InternalExecute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Execute(String commandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebElement.Click()
Sometimes Timeout in exception message looks legit (300 seconds), but in most cases it has negative value like -0.028.
I use:
Chrome 52.0.2743.116
Selenium 2.53.1
ChromeDriver 2.23 (also produces with 2.22)
Update:
I start getting this error also on RemoteNavigator.GoToUrl
Type: OpenQA.Selenium.WebDriverTimeoutException
Message: timeout: cannot determine loading status
from timeout: Timed out receiving message from renderer: -0.032
(Session info: chrome=52.0.2743.116)
(Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.3.9600 x86_64)
Stack trace:
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.set_Url(String value)
at OpenQA.Selenium.Remote.RemoteNavigator.GoToUrl(String url)
Upvotes: 8
Views: 7213
Reputation: 129
I found the root cause of the issue, at least for my case. We were running the selenium tests on a Jenkins machine which was using a proxy server. We came across this issue only when we enabled logging to All. Its a known fact that websockets do not work with proxies and chromedriver uses websockets to fetch browser logs. So we disabled proxy and the issue is resolved.
Upvotes: 0
Reputation: 1786
Solved this by reducing degree of parallelism of my test runner from 30 to 10. It looks like overusing CPU causes requests not to reach web drivers for some reason.
Upvotes: 0
Reputation: 3645
Little peak into the Selenium source code will reveal that every action on the WebElement
or infact any Selenium interaction will invoke execute(String driverCommand, Map<String, ?> parameters)
of RemoteWebDriver class
This will execute command through the CommandExecutor
Interface which is implemented by different drivers
ChromeDriver also implements this and you are seeing this error due to a bug which chromium team is aware and is working on. please check the bug details here.
The error rate has come down with Chromedriver v2.23 but its still occurring but rarely
Upvotes: 1