Open juliemr opened 9 years ago
We’re seeing exactly this at work with a large Karma test suite and Saucelabs. I’ve not yet been able to work out if the issue is with Karma, Saucelabs or karma-saucelabs-launcher.
I'm a Sauce Labs employee, investigating the same issue for a customer.
Something weird seems to be going on; When I watched one of the tests with video turned on (By adding the line recordVideo: true
to the sauceLabs
object in my config) the Karma header never updated from 'Karma - starting', but the list of browsers and browser activity did.
From https://github.com/karma-runner/karma/blob/v0.12.31/client/updater.js#L22 it appears that, once a connection has been made, the status should have been updated.
But, the list of browsers is updated when an 'info' event is emitted: https://github.com/karma-runner/karma/blob/v0.12.31/client/updater.js#L27
(Both of these were in karma.js
which I assume is compiled from everything in the client
directory?)
So I'm a little confused how we could simultaneously not be connected, and receiving events from the server. I'd think it was just the StatusUpdater
being naughty but you were saying you're not seeing a console log of the socket ever connecting.
In a local install of Karma I added the connecting
and connect_failed
events to try to track more precisely what was going on. Unfortunately I can't get the problem to reproduce. I've cloned Angular's repo and am currently trying to get it running tests in the hope it'll fail consistently, so I can have at it more savagely.
Disclaimer: I'm mostly a Ruby dude, I don't have the JS-fu so might just be missing something obvious.
Also trying Win7 + IE 9 and I'm seeing (in screenshot) a 'Bad Gateway: Connection refused' inside the browser when the POST to /session happens . I tried this config earlier with a different test runner and had similar connection problems with sauce (using saucie + testem). That seems to indicate a sauce issue.
@juliemr is this still an issue?
Looking at the code path and seeing what is said from prior attempts to debug in comments here, my suspicion would be that a V8 bug is lurking here (although I do not know if it would be fixed already), or Socket.io isn't doing the right thing in IE9 here.
On register
, socket.io creates a Browser instance here, which then adds it to the collection when init
is called here. add
just pushes it into the internal array and emits the change event here. Lastly, the change listener simply emits the event to the client with the data here.
The only way I can see that a connection could fail here is if the array is not truly mutated before the serialize method is called, which would explain why that socket is not notified of the info
event.
The angular.js unit test job fails intermittently because Karma times out (hits the Travis 10 minute timeout). It appears that IE9 is never started, because it simply doesn't appear in the logs.
Passing log (https://travis-ci.org/angular/angular.js/jobs/46478813)
Failing log (https://travis-ci.org/angular/angular.js/jobs/46487145)
Note that the failing log never connects to IE9, but it doesn't show an error message either. The Sauce Labs link for the IE9 session is https://saucelabs.com/tests/b98c944eb4104602bd964640e546c04e