Timed out receiving message from renderer while running test with chrome browser

3,228 views
Skip to first unread message

testingzeal

unread,
Jun 13, 2014, 12:05:07 AM6/13/14
to webd...@googlegroups.com
I am often having the "Timed out receiving message from renderer" while running tests on chrome browser.

Using webdriver 2.39
chrome 34 , 2.9 chrome driver.


Can some one help me how to resolve this error?

Thanks!

darrell

unread,
Jun 13, 2014, 4:47:15 PM6/13/14
to webd...@googlegroups.com
Selenium 2.39.0 was release December 16, 2013. Chrome 34 was released February 17, 2014. ChromeDriver was release in the first week of February 2014 (which day depends on OS). So this should be a good combination. I have never received this message. This leads me to believe something else in your environment (operating system, amount of memory, your code) is causing the issue. Post your machine configuration (I doubt this is the problem) and maybe a snippet of code which fails the most.

testingzeal

unread,
Jun 13, 2014, 5:22:27 PM6/13/14
to webdriver
Below is my machine info Darrell.Let me know if you need anything else.

This happens mostly on the page load. 

For ex - Clicking on a link lands on a page and that page spins and throws this error. 

Few mins before i have upgraded my chrome browser to 35 and still using chromedriver 2.9 and noticed the same error.


Just curious which version of chrome 34 you are using , Can you give me the full version number and also can you point me on where to download that chrome version?
Inline image 1


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.

darrell

unread,
Jun 14, 2014, 9:25:46 AM6/14/14
to webd...@googlegroups.com
Your machine is fairly current with lots of memory. As I suspected, it is unlikely your machine configuration. This would lead me to believe there is something you are doing in your code which is causing the issue. I would search the Selenium source code for the error message you are receiving and look over the code. If I know my own code and I match it to the code generating the error message I might be able to come up with a theory as to what is going wrong.

This is something I could only do if I fully understood the code which might cause the error to appear. I'm not prepared to have that sort of understanding of your code but that is what I would suggest you do to solve this problem.

As for the version of Chrome I'm using, I work on client machines and my own machine. I'm been on three different configurations in the past few weeks. Therefore, the version of Chrome is probably not the issue here. Making sure Selenium, Chrome and ChromeDriver are all in sync with each other is important in eliminating the possibility of multiple issues but it is not so critical that being off by one or two versions of Chrome will make a difference.

If you are using Chrome 35 I believe it was released March 31, 2014. Selenium 2.41.0 was released March 27, 2014. Therefore there is no way they could have validated Selenium 2.41.0 against Chrome 35. It is possible they work together but I'd pick a Selenium released after the browser was released. So I'd use Selenium 2.42.0 with Chrome 35. Additionally, ChromeDriver 2.10 was released around the same time as Selenium 2.42.0. General rule for me is pick a version of Selenium released just after the browser was released. Pick a version of ChromeDriver and IEDriverServer released at the same time as Selenium. This is reduce the chance for problems but it still does not address a bad configuration or bad code.

I suspect you are doing something in your code which is either bad code or code which has exposed a defect in Selenium. This is the theory I could investigate.

testingzeal

unread,
Jun 16, 2014, 1:14:54 PM6/16/14
to webd...@googlegroups.com
Darell ,

Today I noticed the pattern of time out message. It is blowing up on wait statements on different pages each time and blows up with the  time out error
If i rerun the script, it passed.

FYI - It happens randomly on different scripts , but common trigger of this error is Wait statement

Here is my wait code, Do you see some thing bad with my wait statements?
++++++++++++++++++

WebDriverWait wait =new WebDriverWait(driver,60);
wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("a[href*='/xxxx/yyyy/"+picId+"']")));

+++++++++++++++++++++++++++++++++org.openqa.selenium.TimeoutException: timeout: Timed out receiving message from renderer: 300.000

Thanks!

darrell

unread,
Jun 17, 2014, 10:49:53 AM6/17/14
to webd...@googlegroups.com
I'd investigate the possibility of something before the wait statement putting the system into a bad state. 

In OS design there is a concept called thrashing. The idea is that things become exponential bad when you reach a threshold. For example, if I have a 4 core computer and I have between 1 and 4 processes running things are fine. However, the moment I have a fifth process things slow down. What happens is the OS will have to occasionally save the state of a process to disk then restore the fifth process to memory. This disk activity causes timing to switch from RAM (nanoseconds) to Disk (milliseconds). The end result is the time for 5 processes to complete is exponentially longer than 4 processes + 1 process. For example, all 5 processes might take 30 minutes to complete but 4 + 1 process will take 20 minutes +  5 minutes for a total of 25 minutes.

The generalized concept is, don't try to do too much at once and things get done faster. From a real life example, if you have 20 things which need to be fixed on a project, trying to fix all 20 things at once usually fails to fix anything properly. However, picking the top 3 things, fix them, pick the next top 3 things, fix them, etc. will get all things fixed faster and better.

Maybe you code is doing too much too quickly. Maybe waiting for certain events earlier in the cycle will give the system time to get things done. Conceptually you might have:

- do #1 something
- do #2 something
- do #3 something
- do #4 something
- do #5 something
- do #6 something
- wait for a condition
- do #7 something
- do #8 something

It could be the system is still dealing with conditions #6, #5 and possibly #4. So the wait condition isn't really waiting for #6 to finish. I'd look at some of the earlier steps and think, in theory, could they take some time to complete occasionally. If I notice that #2 might actually take a while to complete, even if I don't need to wait for it in order to complete #3, I might need to wait. Not for a direct dependency between #2 and #3 but more they will both be competing for a resource. So I might change the code to be:

- do #1 something
- do #2 something
- do #3 something
- do #4 something
- wait for a condition which indicates #2 is complete
- do #5 something
- do #6 something
- wait for a condition
- do #7 something
- do #8 something

Where you wait, what you wait for, etc. requires you to have a really good feel for what is happening in the system. The worst part is my example has been HUGELY simplified. It is rare for the code to be linear. The timing is more a call to a call to a sub-routine to a library all inside a loop with if statements.

Sometimes I'll test a theory by just profiling the CPU, memory and Disk I/O to see if there is a correlation between a failure in my test suite and a spike in one of the things I'm profiling. Unfortunately, sometimes the act of profiling changes timing just enough to make the problem go away. You stop profiling and the problem comes back.

Sometimes if the profiling shows spikes in certain areas I'll add a sleep statement just before the spike and see if the spike goes away. If it does then I'll look at the code near the sleep and see if I can change the sleep to a wait-for-event statement.

The best thing I can suggest is that knowledge is power. Time box trying to fix the problem. Set two goals; the first is to see if you can make the problem go away and the second is to learn something about the system and how it works. The more you learn about the system the more you can apply to your next project. So trying to fix this problem might not be successful but hopefully it will add to your experience and pay off in future projects.

Krishnan Mahadevan

unread,
Jun 17, 2014, 11:09:25 AM6/17/14
to webdriver
There is a bug out there that is tracking something similar to this problem : http://code.google.com/p/chromedriver/issues/detail?id=402

Please go through the comments patiently, and see if some of the options being suggested help. If nothing else works out, you can try providing a reproducible test and also attach the chromedriver logs in the bug report.



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
Reply all
Reply to author
Forward
0 new messages