Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow shutdown #14

Closed
johanneswuerbach opened this issue Oct 2, 2013 · 12 comments
Closed

Slow shutdown #14

johanneswuerbach opened this issue Oct 2, 2013 · 12 comments

Comments

@johanneswuerbach
Copy link
Contributor

In several builds on Travis I see the exit after "INFO [launcher.sauce]: Shutting down Sauce Connect" takes 2-3 minutes. I'm not sure whether this is a karma or sauce connect launcher problem.

Do you have any idea? Browsers used are FF 20 (Win 8), IE 10 (Win 8) and Chrome (Linux)

@jfroom
Copy link

jfroom commented Nov 1, 2013

I just experienced a run from my local machine with two sauce connected browsers (chrome-linux, firefox-linux) where one 'finished' and the other hung. I killed the process manually after about a minute (trying to preserve my sauce credits).

I ran the test two more times after this and both times exited successfully on its own.

@jfroom
Copy link

jfroom commented Nov 4, 2013

Am experiencing a connection to iOS 6.1 which will not close on its own. I get this log:

Mobile Safari 6.0.0 (iOS 6.0): Executed 48 of 48 SUCCESS (42.064 secs / 0.783 secs)
INFO [launcher.sauce]: Shutting down Sauce Connect

But I have to manually cancel the test via Sauce's web interface.

@axemclion
Copy link
Contributor

+1 to slow shutdown. Looks like the test is waiting for timeout of browsers before closing the connection ?

@johanneswuerbach
Copy link
Contributor Author

I looks like the connection is closed before the browser loaded about:blank, which doesn't kill the browser.

screenshot 2013-12-30 15 43 04

@thom4parisot
Copy link

What is the state of that issue? Some builds are failing as nothing responds.

johanneswuerbach added a commit to johanneswuerbach/karma-sauce-launcher that referenced this issue Feb 11, 2014
@nickradford
Copy link

+1 to slow shutdown. I see the heartbeat method is being run repeatedly, just an observation.

What's the state of this?

johanneswuerbach added a commit to johanneswuerbach/karma-sauce-launcher that referenced this issue Mar 17, 2014
johanneswuerbach added a commit to johanneswuerbach/karma-sauce-launcher that referenced this issue Mar 17, 2014
johanneswuerbach added a commit to johanneswuerbach/karma-sauce-launcher that referenced this issue Mar 17, 2014
@thom4parisot
Copy link

I still encounter the issue: https://travis-ci.org/bbcrd/peaks.js/builds/29082024#L3048

Anything specific to do?

@johanneswuerbach
Copy link
Contributor Author

I use my fix #19 for a while now and haven't seen this error again. I'm not sure why this was never merged. @vojtajina ?

@bessdsv
Copy link

bessdsv commented Aug 28, 2014

In new wersion used next code in lib/sauce_launcher.js
this.on('kill', function(done) {
if (sessionIsReady) {
....
driver.get('about:blank').catch().quit().nodeify(allDone);
sessionIsReady = false;
} else {
pendingCancellations++;
process.nextTick(allDone);
}
});
};

when i run karma with existing Virtual Tunnel and setted startConnect: false - all work excellent
but when i run with creating Virtual Tunel (default) tunnel not closing
and event driver.get('about:blank').catch().quit().nodeify(allDone);
do not fired

@givankin
Copy link

+1, the issue is very unfortunate because it costs money. It currently takes 15 minutes until SL shuts down the session when this happens. Which means 14 paid minutes wasted.

@transplier
Copy link

+1 for us too. We currently have an active support ticket with SauceLabs to try and figure things out. Of note, the navigation to about:blank is indeed the culprit, but changing it to navigate to some other site instead (we used google) does not help. Will update as we learn more.

@transplier
Copy link

For us, it was a timing issue specifically in Chrome + Sauce. Seems like removing an iframe from within its own load event handler hangs Sauce + Chrome when the session is torn down, but only if that iframe is loading about:blank. Here is a minimal repro:

it.only('hangs SauceLabs', function(done) {
 // Minimally-sufficient set of operations to trigger bug.
 // All lines are needed, except the call to done().
 var iframe = $('<iframe>');  iframe
   .appendTo('body')
   .prop('src', 'about:blank') // Needs to be about:blank.
   .on('load', function() {
     iframe.remove();
     done(); //Not strictly needed.
   });
});

One of our tests does something similar. We've worked around the issue for now by loading a different site in the iframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants