karma-runner / karma-runner/karma
IE8 outside of an iFrame never connects to Karma Server
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Expected behaviour
Karma can connect to a Sauce Labs session running on IE8, Windows 7 and execute a simple test suite.
### Actual behaviour
Karma will connect, then timeout waiting for messages:
```
12 09 2016 01:36:38.416:INFO [launcher.sauce]: internet explorer 8 session at https://saucelabs.com/tests/0372bb42efb2493895bcc86b225605c1
12 09 2016 01:36:47.889:INFO [IE 8.0.0 (Windows 7 0.0.0)]: Connected on socket /#oG2ATJ5URrm38A7VAAAA with id 62797665
12 09 2016 01:36:57.894:WARN [IE 8.0.0 (Windows 7 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
IE 8.0.0 (Windows 7 0.0.0) ERROR
Disconnected, because no message in 10000 ms.
IE 8.0.0 (Windows 7 0.0.0) ERROR
Disconnected, because no message in 10000 ms.
IE 8.0.0 (Windows 7 0.0.0): Executed 0 of 0 DISCONNECTED (10.006 secs / 0 secs)
```
### Environment Details
Sauce Labs' infrastructure
- Karma version (output of `karma --version`):
Karma version: 1.3.0.
Also tested, 1.2.0, 1.1.0, 13.22.0
- Relevant part of your `karma.config.js` file
```
// Browsers to run on Sauce Labs
var customLaunchers = {
'SL_InternetExplorer': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '8'
}
};
config.set({
client: {
useIframe: false
},
customLaunchers: customLaunchers,
browsers: Object.keys(customLaunchers),
singleRun: true
```
### Steps to reproduce the behaviour
1. Configure a Karma suite according to [these instructions](https://github.com/karma-runner/karma-sauce-launcher) for Karma-sauce-launcher.
2. Use the above customLaunchers to kick off a Karma session.
3. Sadness and Woe as your tests time out.
### Additional Information
I work for Sauce Labs and I've spent a couple of hours digging into this. By starting Karma without being in Single Run mode, I was able to find that the non-iFrame version was causing JS errors in `context.js.`:
```
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E)
Timestamp: Mon, 12 Sep 2016 08:52:15 UTC
Message: JScript object expected
Line: 239
Char: 5
Code: 0
URI: http://localhost:9876/context.js
```
That method appears to have to do with proxying Karma methods to the main window? From this error description: https://msdn.microsoft.com/en-us/library/yt9ydd55(v=vs.94).aspx I did some digging (and have now lost the relevant link) and it appears that maybe Window isn't a JS object for IE8, hence the error. And that exhausted my JS capabilities.
Contributor guide
Assessment
This issue has not been assessed yet.