Page 1 of 1

BUG: Intermittent exceptions on close of Chrome

Posted: Fri Sep 05, 2014 2:49 pm
by krstcs
Ranorex 5.1.2
Windows 7
Chrome 37

I upgraded last week, but this issue just started last night with our test run on one of our products. I have started getting the following error and stack trace on my tests, intermittently but consistently.

Action 'close' failed on element '{WebDocument:Chrome}'.
Failed to read from an IPC Port: The pipe has been ended.

Code: Select all

at Ranorex.Core.Element.InvokeAction(String name, Object[] args)
 at Ranorex.Host.CloseApplication(Element containedElement, Duration gracePeriod)
 at TCS_CDC_CORE.Close_TCS_CDC.Ranorex.Core.Testing.ITestModule.Run() in d:\QA_Jenkins\QA-Build-Ranorex-TCS_CDC\workspace\TCS_CDC\TCS_CDC_CORE\Close_TCS_CDC.cs:line 92
 at Ranorex.Core.Testing.TestSuiteModule.RunInternal(DataContext parentDataContext)
Sometimes it works fine, sometimes it doesn't. This is happening on only one system. I did a full clean re-install and get the same thing.

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Tue Sep 09, 2014 2:46 pm
by Support Team
Hi krstcs,

It seems like you get a race condition while closing Chrome. Can you please check whether the exception is thrown if you close the browser using the form.close() method?

Thanks,
Robert

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Tue Sep 09, 2014 6:44 pm
by krstcs
Robert,

I've tried both ways now and I'm not seeing the error anymore on the original method, so I don't have a lot to compare to. It is possible that it was just a transient issue with that one VM, so I will sit on it for a bit and see if it starts back up. If it does, I'll try the form.close() method.


Thanks!

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Mon Sep 15, 2014 3:21 pm
by krstcs
OK, it has come back.

I don't see how it is a race condition on my side since this worked perfectly fine before I upgraded to 5.1.2.

Something changed in 5.1.2 that is causing this problem. I haven't changed my tests except to re-compile with 5.1.2.

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Thu Sep 18, 2014 2:08 pm
by Support Team
Hi krstcs,

That’s a pity.

Unfortunately, we cannot reproduce the issue on our side. May I ask you which steps are performed right before closing Chrome? Additionally, it would be interesting how Chrome is closed (e.g., closing tabs, clicking the close sign, form.close()).

Thanks,
Robert

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Mon Sep 22, 2014 3:41 pm
by krstcs
I don't have the issue on my local system, only on a virtual machine in our test bed.

The close action is being taken against the web document (/dom) object, so I'm assuming that it is being passed up the chain to the containing browser.

Code: Select all

Close Application -> Close Window -> 0ms -> <Dom object>
Could it be the 0ms grace period? I changed it to 1000ms and am re-running the tests, so far 1 run has had no problems, but that isn't unusual. I will run it several more times to see if it happens again.

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Mon Sep 22, 2014 9:27 pm
by mcs
krstcs,

I'm not sure if this is related but thought I'd add my 2 cents... I work solely on VMs and test with all browsers. Chrome is the one browser that gives me problems in terms of closing gracefully. I've added code to my tests to just kill it if the kinder gentler methods don't work.
Also, often, it will not completely launch the first time I boot up in the morning but it will be running in TaskManager. I have zero issues with IE, Firefox and Safari.
It's a shame, too, because I really like Chrome. :D

Mike

Re: BUG: Intermittent exceptions on close of Chrome

Posted: Mon Sep 22, 2014 9:35 pm
by krstcs
Yeah, funny thing is, I have had fewer problems with Chrome with our site because all my devs code to Chrome. I have to go back and show them IE and FF to get them to fix stuff (they are really good about it though, I'm not complaining... much... :D).


The thing with this issue is that it was working fine up until I updated Ranorex. I didn't get any errors, and this test had been running as-is for about 6 months with no issues (at all) and then this started the day I upgraded. I find it hard to think this is a coincidence. But maybe that's just my QA nature coming out...

Anyway, thanks for the input! If we can't get this worked out I may end up just killing it instead.