karma-runner / karma-runner/karma

Chrome occasionally does not receive any messages before default 10s timeout - Windows 10

Open
#2,790 3 comments 1 reaction 0 assignees View on GitHub
help wanted needs: investigation
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Expected behaviour
Chrome should receive messages from Karma during test suite. Once received tests should run.
### Actual behaviour
Server is started with unlimited concurrency. Chrome is started. Chrome then disconnects with the results:
Disconnected (1 times), because no message in 10000 ms.

### Environment Details
Windows 10
Chrome Version 59.0.3071.115 (Official Build) (64-bit)
Karma version: 1.7.0

```
config.set({
frameworks: ['jasmine'],
files: [..],
preprocessors: [...],
reporters: ['progress', 'coverage', 'tfs'],
port: 9876,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity,
// reporters...
});
```

### Relevant Project dependencies:
```
...
"jasmine-core": "2.5.2",
"karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "1.0.1",
"karma-jasmine": "1.1.0",
"karma-ng-html2js-preprocessor": "^1.0.0",
"karma-phantomjs-launcher": "1.0.4",
"karma-spec-reporter": "0.0.31",
"karma-tfs-reporter": "^1.0.0"
...
```
### Steps to reproduce the behaviour
0. Create a project with the above dependencies and set up a basic gulp runner that runs unit tests using chrome and Karma.
1. Run tests
2. Watch for occasional failures.
3. Drink heavily after work.

### Additional Description:
I'm using Karma and Gulp to run unit tests in a Windows 10 TFS environment. Intermittently my builds are failing due to the aforementioned error. The stack trace that I am seeing is attached. I think there might be an issue with Chrome child processes or something not closing or perhaps a breaking change between Chrome versions that recently popped up, but I'm not sure.
[stack trace.txt](https://github.com/karma-runner/karma/files/1183824/stack.trace.txt)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the intermittent failure with the provided Karma configuration, Chrome 59 on Windows 10, and the listed dependencies. Read the attached stack trace and trace the Chrome disconnect and 10-second timeout path; done means the reported test run no longer intermittently disconnects before receiving messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.