karma-runner / karma-runner/karma
TeamCity failed karma start
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
TeamCity failed during runing karma unit tests.
The log catched in the overview of teamcity
```
[15:31:38]Step 2/4: Unit test (Node.js NPM) (5m)
[15:31:38][Step 2/4] Executing npm via wrapping shell script
[15:31:38][Step 2/4] Starting: cmd /c npm run test-tc
[15:31:38][Step 2/4] in directory: C:\TeamCity\buildAgent\work\5f0ec385fa69463e
[15:31:38][Step 2/4] npm run test-tc (4m:49s)
[15:31:40][npm run test-tc]
[15:31:40][npm run test-tc] > ezweb@1.0.0 test-tc C:\TeamCity\buildAgent\work\5f0ec385fa69463e
[15:31:40][npm run test-tc] > karma start config/karma.tc-conf.js --colors false
[15:31:40][npm run test-tc]
[15:31:52][Step 2/4] JavaScript Unit Tests (4m:21s)
[15:33:31][npm run test-tc] 06 09 2017 15:33:29.390:INFO [karma]: Karma v1.5.0 server started at http://0.0.0.0:9876/
[15:33:36][npm run test-tc] 06 09 2017 15:33:29.718:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
[15:33:36][npm run test-tc] 06 09 2017 15:33:30.094:INFO [launcher]: Starting browser PhantomJS
[15:33:56][npm run test-tc] 06 09 2017 15:33:56.735:INFO [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Connected on socket mJqjPAbWCgMaZngGAAAA with id 66573197
[15:35:50][npm run test-tc] 06 09 2017 15:35:50.574:WARN [web-server]: 404: /config.json
[15:36:14][npm run test-tc] 06 09 2017 15:36:14.187:WARN [PhantomJS 2.1.1 (Windows 7 0.0.0)]: Disconnected (1 times)
[15:36:14][npm run test-tc] PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
[15:36:14][npm run test-tc] Disconnectedundefined
[15:36:14][npm run test-tc]
[15:36:14][npm run test-tc] PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
[15:36:14][npm run test-tc] Disconnectedundefined
[15:36:14][npm run test-tc] PhantomJS 2.1.1 (Windows 7 0.0.0) ERROR
[15:36:14][npm run test-tc] Disconnectedundefined
[15:36:14][npm run test-tc]
[15:36:17][npm run test-tc] 06 09 2017 15:36:17.034:WARN [launcher]: PhantomJS was not killed in 2000 ms, sending SIGKILL.
[15:36:21][npm run test-tc]
[15:36:21][npm run test-tc] npm ERR! Windows_NT 6.1.7601
[15:36:21][npm run test-tc] npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-tc"
[15:36:21][npm run test-tc] npm ERR! node v6.9.1
[15:36:21][npm run test-tc] npm ERR! npm v3.10.8
[15:36:21][npm run test-tc] npm ERR! code ELIFECYCLE
[15:36:21][npm run test-tc] npm ERR! ezweb@1.0.0 test-tc: `karma start config/karma.tc-conf.js --colors false`
[15:36:21][npm run test-tc] npm ERR! Exit status 1
[15:36:21][npm run test-tc] npm ERR!
[15:36:21][npm run test-tc] npm ERR! Failed at the ezweb@1.0.0 test-tc script 'karma start config/karma.tc-conf.js --colors false'.
[15:36:21][npm run test-tc] npm ERR! Make sure you have the latest version of node.js and npm installed.
[15:36:21][npm run test-tc] npm ERR! If you do, this is most likely a problem with the ezweb package,
[15:36:21][npm run test-tc] npm ERR! not with npm itself.
[15:36:21][npm run test-tc] npm ERR! Tell the author that this fails on your system:
[15:36:27][npm run test-tc] npm ERR! karma start config/karma.tc-conf.js --colors false
[15:36:27][npm run test-tc] npm ERR! You can get information on how to open an issue for this project with:
[15:36:27][npm run test-tc] npm ERR! npm bugs ezweb
[15:36:27][npm run test-tc] npm ERR! Or if that isn't available, you can get their info via:
[15:36:27][npm run test-tc] npm ERR! npm owner ls ezweb
[15:36:27][npm run test-tc] npm ERR! There is likely additional logging output above.
[15:36:27][npm run test-tc]
[15:36:27][npm run test-tc] npm ERR! Please include the following file with any support request:
[15:36:27][npm run test-tc] npm ERR! C:\TeamCity\buildAgent\work\5f0ec385fa69463e\npm-debug.log
[15:36:28][Step 2/4] Process exited with code 1
[15:36:37][Step 2/4] Process exited with code 1
[15:36:38][Step 2/4] Step Unit test (Node.js NPM) failed
```
And the npm-debug-log from the buildAgent folder :
```
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'test-tc' ]
2 info using npm@3.10.8
3 info using node@v6.9.1
4 verbose run-script [ 'pretest-tc', 'test-tc', 'posttest-tc' ]
5 info lifecycle ezweb@1.0.0~pretest-tc: ezweb@1.0.0
6 silly lifecycle ezweb@1.0.0~pretest-tc: no script for pretest-tc, continuing
7 info lifecycle ezweb@1.0.0~test-tc: ezweb@1.0.0
8 verbose lifecycle ezweb@1.0.0~test-tc: unsafe-perm in lifecycle true
9 verbose lifecycle ezweb@1.0.0~test-tc: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\TeamCity\buildAgent\work\5f0ec385fa69463e\node_modules\.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Amazon\cfn-bootstrap\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\dotnet\
10 verbose lifecycle ezweb@1.0.0~test-tc: CWD: C:\TeamCity\buildAgent\work\5f0ec385fa69463e
11 silly lifecycle ezweb@1.0.0~test-tc: Args: [ '/d /s /c',
11 silly lifecycle 'karma start config/karma.tc-conf.js --colors false' ]
12 silly lifecycle ezweb@1.0.0~test-tc: Returned: code: 1 signal: null
13 info lifecycle ezweb@1.0.0~test-tc: Failed to exec test-tc script
14 verbose stack Error: ezweb@1.0.0 test-tc: `karma start config/karma.tc-conf.js --colors false`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:877:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid ezweb@1.0.0
16 verbose cwd C:\TeamCity\buildAgent\work\5f0ec385fa69463e
17 error Windows_NT 6.1.7601
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "test-tc"
19 error node v6.9.1
20 error npm v3.10.8
21 error code ELIFECYCLE
22 error ezweb@1.0.0 test-tc: `karma start config/karma.tc-conf.js --colors false`
22 error Exit status 1
23 error Failed at the ezweb@1.0.0 test-tc script 'karma start config/karma.tc-conf.js --colors false'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ezweb package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error karma start config/karma.tc-conf.js --colors false
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ezweb
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ezweb
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
```
Versions
Windows_NT 6.1.7601
node v6.9.1
v3.10.8
"karma": "1.5.0"
"karma-phantomjs-launcher": "1.0.4"
"karma-teamcity-reporter": "1.0.1"
"karma-webpack": "2.0.2"
If someone have an idea about this bug ?
Contributor guide
Research direction
Start with config/karma.tc-conf.js and reproduce the TeamCity command, npm run test-tc, using the listed Windows, Node.js, Karma, and PhantomJS versions. Inspect the /config.json 404 and PhantomJS disconnection in the provided logs; done means the Karma unit-test step completes successfully in TeamCity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- ci-cd, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100