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

IE6 freeze on sauce Labs #983

Closed
SergioCrisostomo opened this issue Mar 24, 2014 · 14 comments
Closed

IE6 freeze on sauce Labs #983

SergioCrisostomo opened this issue Mar 24, 2014 · 14 comments

Comments

@SergioCrisostomo
Copy link

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.

@xavierKress
Copy link

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

@PixnBits
Copy link

also freezes w/o any tests at all
to bump karma-runner/karma-sauce-launcher#24 (comment), @vojtajina does Karma support IE6?
searches yielded no results either way

@SergioCrisostomo
Copy link
Author

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

@Krinkle
Copy link
Contributor

Krinkle commented Jul 19, 2014

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"

@PixnBits
Copy link

👍 thanks!

@sgarbesi
Copy link

👍

@mrsimonemms
Copy link

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.

@dignifiedquire
Copy link
Member

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

@mrsimonemms
Copy link

@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

@dignifiedquire
Copy link
Member

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?

@mrsimonemms
Copy link

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

Krinkle added a commit to wikimedia/oojs-core that referenced this issue Aug 25, 2015
* Revert Karma v0.13 back to v0.12.
  Karma v0.13 upgrades Socket.IO to 1.0 which drops support
  for jsonp-polling (and xhr-polling or websockets are not supported
  in older browsers). They now provide this feature via:
  transport=polling and forceJSONP=true, however Karma hasn't
  expose that option yet. Upstream: karma-runner/karma#983

  Was causing tests to time out as the transports array effectively
  became empty leaving the client no way to communicate with the server.

  Follows-up e76f759.

* Drop Safari 5 in favour of Safari 6.

  OSX 10.6 is end-of-life as of July 2015.
  See <https://support.saucelabs.com/customer/portal/articles/2061176-end-of-life-for-osx-10-6>

  Launching OSX 10.6/Safari 5 was causing an error:
  "The environment you requested was unavailable"

Change-Id: If88d648b657d8a571beb7991805f8af8bd547975
@Krinkle
Copy link
Contributor

Krinkle commented Aug 25, 2015

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.

@JamesMGreene
Copy link

👍 😕

@dignifiedquire
Copy link
Member

Tracking IE compat in #1564 so closing this issue

wmfgerrit pushed a commit to wikimedia/oojs-core that referenced this issue Feb 12, 2016
Follows-up 16a5f8c which downgraded Karma back to 0.12.
The issue with IE<9 was fixed in Karma v0.13.20.

* karma-runner/karma#983
* karma-runner/karma#1564

Also makes use of the new 'concurrency' option introduced in
Karma v0.13.12. This makes the test run a bit faster by starting
browser #4 as soon as one of browsers 1-2-3 is finished, etc.

Once we drop ES3 and IE6 support, we can remove ci1/ci2 split.

Also:
* PhantomJS node-wrapper package got renamed, which is
  required by karma-phantomjs-launcher.
* Can't upgrade grunt-contrib-uglify because the new version
  depends on a newer version of npm package 'gzip-size' which
  dropped support for Node 0.10 (which Wikimedia CI still uses).

Change-Id: I08bed822273bca2d2d80fa765fc0b0fbba4d997a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants