BUG: Intermittent exceptions on close of Chrome

Bug reports.
krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

BUG: Intermittent exceptions on close of Chrome

Post by krstcs » Fri Sep 05, 2014 2:49 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: BUG: Intermittent exceptions on close of Chrome

Post by Support Team » Tue Sep 09, 2014 2:46 pm

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
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: BUG: Intermittent exceptions on close of Chrome

Post by krstcs » Tue Sep 09, 2014 6:44 pm

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!
Shortcuts usually aren't...

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: BUG: Intermittent exceptions on close of Chrome

Post by krstcs » Mon Sep 15, 2014 3:21 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: BUG: Intermittent exceptions on close of Chrome

Post by Support Team » Thu Sep 18, 2014 2:08 pm

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
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: BUG: Intermittent exceptions on close of Chrome

Post by krstcs » Mon Sep 22, 2014 3:41 pm

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.
Shortcuts usually aren't...

mcs
Posts: 29
Joined: Mon Aug 11, 2014 5:00 pm
Location: Portsmouth, NH

Re: BUG: Intermittent exceptions on close of Chrome

Post by mcs » Mon Sep 22, 2014 9:27 pm

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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: BUG: Intermittent exceptions on close of Chrome

Post by krstcs » Mon Sep 22, 2014 9:35 pm

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.
Shortcuts usually aren't...