Karma: IE6 freeze on sauce Labs

Created on 24 Mar 2014  Â·  14Comments  Â·  Source: karma-runner/karma

Hi all!

I have been trying to test my javascript with Grunt/Karma/Jasmine on SauceLabs and I get a recurrent error: internet explorer 6 (Windows XP) on SauceLabs have not captured in 120000 ms, killing.

Is this a know issue? is there a "right way to do this?"

All other IE work on my tests, just IE6 doesn't. I Can see on SauceLabs "Karma is running" but nothing more happens.

Had issue open at karma-sauce-launcher, but seems the problem might be Karma.

I know IE6 is almost dead, but still would like to know why this hangs.

bug windows

Most helpful comment

I would vote for Karma stopping support for IE6. Then we close this issue and have a happier life :ice_cream:

All 14 comments

I have the same freeze with karma, did you find a solution ?

also freezes w/o any tests at all
to bump https://github.com/karma-runner/karma-sauce-launcher/issues/24#issuecomment-37900031, @vojtajina does Karma support IE6?
searches yielded no results either way

I would vote for Karma stopping support for IE6. Then we close this issue and have a happier life :ice_cream:

The problem is due to socket.io not properly falling back to jsonp-polling.

If you're using grunt-karma, an easy workaround is to separate the task into multiple batches (which is a good thing to do anyway if you test in more than 3 browsers due to the limited concurrency and the browsers timing out otherwise anyway), like so:

    var sauceBrowsers = require( './tests/saucelabs.browsers.js' );

    grunt.initConfig( {
        ..
        karma: {
            options: {
                frameworks: [ 'qunit' ],
                files: [
                    'dist/app.js',
                    'test/testrunner.js',
                    'test/unit/*.js'
                ],
                preprocessors: {
                    'dist/*.js': [ 'coverage' ]
                },
                reporters: [ 'dots' ],
                singleRun: true,
                autoWatch: false,
                customLaunchers: sauceBrowsers,
                ..
            ci1: {
                browsers: [ 'slChrome', 'slFirefox', 'slIE11' ]
            },
            ci2: {
                browsers: [ 'slSafari5Mac', 'slIE9', 'slIE6' ],
                // Support IE6: Default socket.io transport doesn't work on IE6
                transports: [ 'jsonp-polling' ]
            },
            phantom: {
                browsers: [ 'PhantomJS' ],
                reporters: [ 'dots', 'coverage' ],
                coverageReporter: { reporters: [
                    {
                        type: 'html',
                        dir: 'dist/coverage/'
                    },
                    {
                        type: 'text-summary'
                    }
                ] }
            },
            bg: {
                browsers: [ 'PhantomJS', 'Firefox', 'Chrome' ],
                singleRun: false,
                background: true
            }
        },
        _watch: {
            files: [
                '.{jscsrc,jshintignore,jshintrc}',
                '<%= files.scipts %>'
            ],
            tasks: [ '_test', 'karma:bg:run' ]
        }
        ..
    } );
    grunt.renameTask( 'watch', '_watch' );

    grunt.registerTask( 'build', .. );
    grunt.registerTask( '_test', [ 'build', 'jshint', 'jscs'] );
    grunt.registerTask( 'test', [ '_test', 'karma:phantom'] );
    grunt.registerTask( 'ci', [ 'test', 'karma:ci1', 'karma:ci2' ] );
    grunt.registerTask( 'watch', [ 'karma:bg:start', '_watch' ] );
    "grunt-karma": "0.8.3",
    "karma": "0.12.17",
    "karma-chrome-launcher": "0.1.4",
    "karma-coverage": "0.2.4",
    "karma-firefox-launcher": "0.1.3",
    "karma-phantomjs-launcher": "0.1.4",
    "karma-qunit": "0.1.3",
    "karma-sauce-launcher": "0.2.9",
    "qunitjs": "1.14.0"

:thumbsup: thanks!

:+1:

Karma v0.13 has removed json-polling from it's list of transports and replaced with polling. However, no matter what I try, I can't get this to work in v0.13.

It seems that, if you want IE6 support, you need to use Karma v0.12. This also seems to be the case with IE7 too.

@riggerthegeek you should be able to add any transport that socket.io supports through the transports option, does that not work for you?

@Dignifiedquire Yeah, it's working as expected. It's just that in v0.13, jsonp-polling has been removed and replaced with simply polling. This doesn't seem to work in the same way (my IE6/7 tests timeout).

Take a look at the v0.13 docs against the v0.12 docs

Okay, so the transport jsonp-polling has been removed from socket.io in version 1.0. But it should be possible to force it to jsonp instead of xhr polling with the option forceJSONP https://github.com/socketio/socket.io-client/blob/e76a671b764ad3314ee98b2c6fe2cc83b0ebc8fa/socket.io.js#L2446-L2450
could you try adding this to https://github.com/karma-runner/karma/blob/master/lib/server.js#L33 and see if that fixes the issue for you?

It looks like it should work, but I doesn't. I added the forceJSONP stuff in the server.js but it doesn't work. What I have noticed that it doesn't appear that the section in socket.io-client doesn't appear to get called at all.

I've had a brief look whilst at work, but it's not as easy as we'd first hoped. I'll see fork and see if I can fix it, but might not be immediately

Noticed the same regression at Wikimedia when trying to upgrade to Karma v0.13.

25 08 2015 01:36:11.190:INFO [karma]: Karma v0.13.3 server started at http://localhost:9876/
25 08 2015 01:36:11.191:INFO [launcher]: Starting browser safari 6 on SauceLabs
25 08 2015 01:36:11.192:INFO [launcher]: Starting browser internet explorer 9 on SauceLabs
25 08 2015 01:36:11.193:INFO [launcher]: Starting browser internet explorer 6 (Windows XP) on SauceLabs
25 08 2015 01:36:44.710:INFO [launcher.sauce]: internet explorer 6 (Windows XP) session at https://saucelabs.com/tests/b495b74af601433c98dc9896427b7e16
25 08 2015 01:36:45.363:INFO [launcher.sauce]: safari 6 session at https://saucelabs.com/tests/3245f3c3e5e04eceb69351e228a78b60
25 08 2015 01:36:47.463:INFO [launcher.sauce]: internet explorer 9 session at https://saucelabs.com/tests/c5c575f5023b45708990bc3e0140c625
25 08 2015 01:37:41.192:WARN [launcher]: safari 6 on SauceLabs have not captured in 90000 ms, killing.
25 08 2015 01:37:41.203:WARN [launcher]: internet explorer 9 on SauceLabs have not captured in 90000 ms, killing.
25 08 2015 01:37:41.217:WARN [launcher]: internet explorer 6 (Windows XP) on SauceLabs have not captured in 90000 ms, killing.
25 08 2015 01:37:42.119:INFO [launcher]: Trying to start safari 6 on SauceLabs again (1/2).
25 08 2015 01:37:42.272:INFO [launcher]: Trying to start internet explorer 9 on SauceLabs again (1/2).
25 08 2015 01:37:42.282:INFO [launcher]: Trying to start internet explorer 6 (Windows XP) on SauceLabs again (1/2).

It just times out. There is no error of any kind when using jsonp-polling.

When using Karma v0.13, setting transports: [ "polling" ], forceJSONP : true in Gruntfile, and locally patching Karma's server.js to pass config.forceJSONP to SocketIO() –  then the non IE6 browsers work again. However IE6 is still timing out. This suggests that this is indeed not passed from socket-io/server to socket-io-client.

:+1: :confused:

Tracking IE compat in #1564 so closing this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IgorMinar picture IgorMinar  Â·  5Comments

VinishaDsouza picture VinishaDsouza  Â·  3Comments

jhildenbiddle picture jhildenbiddle  Â·  4Comments

wellyshen picture wellyshen  Â·  4Comments

mgol picture mgol  Â·  3Comments