grunt watch hangs on karma:unit:run task #37

Closed
devmao opened this Issue May 11, 2013 · 96 comments

Projects

None yet
@devmao
devmao commented May 11, 2013

Hi,

I have this issue every time I update a js file, for example a Ctrl.
But runnig "grunt delta" and "karma start karma/karma-unit.js", in two different console, it's works well.

This the output after an hangs:

Running "clean:0" (clean) task
Cleaning "dist"...OK

Running "html2js:app" (html2js) task

Running "html2js:component" (html2js) task

Running "jshint:src" (jshint) task
>> 16 files lint free.

Running "jshint:test" (jshint) task
>> 4 files lint free.

Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.

Running "jshint:globals" (jshint) task
>> 0 files lint free.

Running "karma:continuous" (karma) task
INFO [karma]: Karma server started at http://localhost:9018/
INFO [launcher]: Starting browser Firefox
INFO [Firefox 20.0 (Linux)]: Connected on socket id Znh0ouyJ14JFR2s9d17s
......
Firefox 20.0 (Linux): Executed 6 of 6 SUCCESS (0.434 secs / 0.039 secs)

Running "concat:dist" (concat) task
File "dist/assets/clean-power-circle.js" created.

Running "concat:libs" (concat) task
File "dist/assets/libs.js" created.

Running "ngmin:dist" (ngmin) task
ngminifying dist/assets/clean-power-circle.js

Running "uglify:dist" (uglify) task
File "dist/assets/clean-power-circle.min.js" created.

Running "recess:build" (recess) task
File "dist/assets/clean-power-circle.css" created.
Uncompressed size: 150906 bytes.
Compressed size: 17191 bytes gzipped (125053 bytes minified).

Running "index" task

Running "copy:assets" (copy) task
Created 3 directories, copied 8 files

Running "copy:bin" (copy) task
Created 1 directories, copied 1 files

Running "karma:unit" (karma) task

Running "delta" task
Waiting...OK
>> File "src/app/membership/membership.js" changed.
Running "jshint:src" (jshint) task
>> 16 files lint free.

Running "karma:unit:run" (karma) task
@joshdmiller
Member

@devmao Sorry you're having trouble. This might be related to #20. Are you sure it's stalling and not just exiting? If you press "enter" are you back at the command line or do you have to Ctrl+c?

@devmao
devmao commented May 11, 2013

I need to Ctrl+c. But if I configured karma for running without starting any browser then grunt, after it refreshed the code, it exits.

@ryanwersal

I am also seeing this behavior and I need to hit it with Ctrl+c as well.

@joshdmiller
Member

How strange. Does the browser string in karma/karma-unit.js refer to an installed and available browser? If you type in that case-sensitive command (e.g. Firefox or Chrome) does it launch? What OS are you using?

@devmao
devmao commented May 12, 2013

Yes, it launch the correct browser. So no problem with the commands Firefox or Chrome. My OS is an Ubuntu 12.04.

@joshdmiller
Member

Well, on Ubuntu the command is "firefox" and not "Firefox" - just double checking. I'm on Arch Linux and do not have the issue. :-/

@ryanwersal, what's your OS?

And can you guys give your Grunt and Karma versions?

@ryanwersal

Ubuntu 13.04
grunt-cli v0.1.8
grunt v0.4.1
karma v0.8.5

I also tried both "firefox" and "Firefox" to see if their outcomes differed. They did not unfortunately.

@joshdmiller
Member

Well this is a bit of a conundrum! Try running it as:

$ grunt watch --verbose --debug

You'll get a lot of junk output, but hopefully there will be some message in there to tell us what the heck is going on.

@devmao
devmao commented May 13, 2013

Hi,

I attached the out of my "grunt watch --verbose --debug" from the start and
the first change in one control. The watch hangs and I did a Ctrl-c.

On 13 May 2013 04:58, Josh D Miller notifications@github.com wrote:

Well this is a bit of a conundrum! Try running it as:

$ grunt watch --verbose --debug

You'll get a lot of junk output, but hopefully there will be _some_message in there to tell us what the heck is going on.


Reply to this email directly or view it on GitHubhttps://github.com/joshdmiller/ng-boilerplate/issues/37#issuecomment-17790946
.

Maurizio Pucci
{ Software Development & Consulting - WebBased.it }
�[4mInitializing�[24m
Command-line options: �[36m--verbose�[39m, �[36m--debug=1�[39m

Reading "Gruntfile.js" Gruntfile...�[32mOK�[39m

�[1mRegistering Gruntfile tasks.�[22m

�[1mRegistering "grunt-recess" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/package.json...�[32mOK�[39m
Loading "recess.js" tasks...�[32mOK�[39m

  • �[36mrecess�[39m

�[1mRegistering "grunt-contrib-clean" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/package.json...�[32mOK�[39m
Loading "clean.js" tasks...�[32mOK�[39m

  • �[36mclean�[39m

�[1mRegistering "grunt-contrib-copy" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/package.json...�[32mOK�[39m
Loading "copy.js" tasks...�[32mOK�[39m

  • �[36mcopy�[39m

�[1mRegistering "grunt-contrib-jshint" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/package.json...�[32mOK�[39m
Loading "jshint.js" tasks...�[32mOK�[39m

  • �[36mjshint�[39m

�[1mRegistering "grunt-contrib-concat" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/package.json...�[32mOK�[39m
Loading "concat.js" tasks...�[32mOK�[39m

  • �[36mconcat�[39m

�[1mRegistering "grunt-contrib-watch" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-watch/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-watch/package.json...�[32mOK�[39m
Loading "watch.js" tasks...�[32mOK�[39m

  • �[36mwatch�[39m

�[1mRegistering "grunt-contrib-uglify" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/package.json...�[32mOK�[39m
Loading "uglify.js" tasks...�[32mOK�[39m

  • �[36muglify�[39m

�[1mRegistering "grunt-karma" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/package.json...�[32mOK�[39m
Loading "grunt-karma.js" tasks...�[32mOK�[39m

  • �[36mkarma�[39m

�[1mRegistering "grunt-ngmin" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-ngmin/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-ngmin/package.json...�[32mOK�[39m
Loading "ngmin.js" tasks...�[32mOK�[39m

  • �[36mngmin�[39m

�[1mRegistering "grunt-tasks" tasks.�[22m
Loading "grunt-html2js.js" tasks...�[32mOK�[39m

  • �[36mhtml2js�[39m
    Reading package.json...�[32mOK�[39m
    Parsing package.json...�[32mOK�[39m
    Initializing config...�[32mOK�[39m
    Loading "Gruntfile.js" tasks...�[32mOK�[39m
  • �[36mwatch�[39m
  • �[36mbuild�[39m, �[36mdefault�[39m, �[36mdelta�[39m, �[36mindex�[39m, �[36mquick-build�[39m, �[36mwatch�[39m

Running tasks: �[36mwatch�[39m

�[4mRunning "watch" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/Gruntfile.js�[39m

�[4mRunning "default" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/Gruntfile.js�[39m

�[4mRunning "build" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/Gruntfile.js�[39m

�[4mRunning "clean" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/tasks/clean.js�[39m

�[4mRunning "clean:0" (clean) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/tasks/clean.js�[39m
Verifying property �[36mclean.0�[39m exists in config...�[32mOK�[39m
Files: �[36mdist�[39m -> �[36m0�[39m
Options: �[36mforce=false�[39m
Cleaning "dist"...Deleting dist...�[32mOK�[39m
�[32mOK�[39m

�[4mRunning "html2js" task�[24m
[D] �[35mTask source: grunt-tasks/grunt-html2js.js�[39m

�[4mRunning "html2js:app" (html2js) task�[24m
[D] �[35mTask source: grunt-tasks/grunt-html2js.js�[39m
Verifying property �[36mhtml2js.app�[39m exists in config...�[32mOK�[39m
Files: �[36msrc/app/about/about.tpl.html�[39m, �[36msrc/app/home/home.tpl.html�[39m, �[36msrc/app/membership/membership.tpl.html�[39m -> �[36mdist/tmp�[39m
Verifying property �[36msrc�[39m exists in config...�[32mOK�[39m
Reading src/app/about/about.tpl.html...�[32mOK�[39m
Writing /home/mao/dev/projects/clean-power-circle/clean-power-circle/dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Reading src/app/home/home.tpl.html...�[32mOK�[39m
Writing /home/mao/dev/projects/clean-power-circle/clean-power-circle/dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Reading src/app/membership/membership.tpl.html...�[32mOK�[39m
Writing /home/mao/dev/projects/clean-power-circle/clean-power-circle/dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Writing /home/mao/dev/projects/clean-power-circle/clean-power-circle/dist/tmp/app.templates.js...�[32mOK�[39m

�[4mRunning "html2js:component" (html2js) task�[24m
[D] �[35mTask source: grunt-tasks/grunt-html2js.js�[39m
Verifying property �[36mhtml2js.component�[39m exists in config...�[32mOK�[39m
Files: �[33m[no src]�[39m -> �[36mdist/tmp�[39m
Verifying property �[36msrc�[39m exists in config...�[32mOK�[39m
Writing /home/mao/dev/projects/clean-power-circle/clean-power-circle/dist/tmp/component.templates.js...�[32mOK�[39m

�[4mRunning "jshint" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m

�[4mRunning "jshint:src" (jshint) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m
Verifying property �[36mjshint.src�[39m exists in config...�[32mOK�[39m
Files: �[36mGruntfile.js�[39m, �[36msrc/app/about/about.js�[39m, �[36msrc/app/app.js�[39m, �[36msrc/app/home/home.js�[39m, �[36msrc/app/membership/membership.js�[39m, �[36msrc/components/cpcService/cpcService.js�[39m, �[36msrc/components/titleService/titleService.js�[39m, �[36mdist/tmp/about/about.tpl.html.js�[39m, �[36mdist/tmp/app.templates.js�[39m, �[36mdist/tmp/component.templates.js�[39m, �[36mdist/tmp/home/home.tpl.html.js�[39m, �[36mdist/tmp/membership/membership.tpl.html.js�[39m, �[36msrc/components/titleService/titleService.spec.js�[39m -> �[36msrc�[39m
JSHint options: �[36mcurly�[39m, �[36mimmed�[39m, �[36mnewcap�[39m, �[36mnoarg�[39m, �[36msub�[39m, �[36mboss�[39m, �[36meqnull�[39m
JSHint globals: �[36m(none)�[39m
Reading Gruntfile.js...�[32mOK�[39m
Linting Gruntfile.js...�[32mOK�[39m
Reading src/app/about/about.js...�[32mOK�[39m
Linting src/app/about/about.js...�[32mOK�[39m
Reading src/app/app.js...�[32mOK�[39m
Linting src/app/app.js...�[32mOK�[39m
Reading src/app/home/home.js...�[32mOK�[39m
Linting src/app/home/home.js...�[32mOK�[39m
Reading src/app/membership/membership.js...�[32mOK�[39m
Linting src/app/membership/membership.js...�[32mOK�[39m
Reading src/components/cpcService/cpcService.js...�[32mOK�[39m
Linting src/components/cpcService/cpcService.js...�[32mOK�[39m
Reading src/components/titleService/titleService.js...�[32mOK�[39m
Linting src/components/titleService/titleService.js...�[32mOK�[39m
Reading dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/app.templates.js...�[32mOK�[39m
Linting dist/tmp/app.templates.js...�[32mOK�[39m
Reading dist/tmp/component.templates.js...�[32mOK�[39m
Linting dist/tmp/component.templates.js...�[32mOK�[39m
Reading dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Reading src/components/titleService/titleService.spec.js...�[32mOK�[39m
Linting src/components/titleService/titleService.spec.js...�[32mOK�[39m
�[32m>> �[39m13 files lint free.

�[4mRunning "jshint:test" (jshint) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m
Verifying property �[36mjshint.test�[39m exists in config...�[32mOK�[39m
Files: �[36msrc/components/titleService/titleService.spec.js�[39m -> �[36mtest�[39m
JSHint options: �[36mcurly�[39m, �[36mimmed�[39m, �[36mnewcap�[39m, �[36mnoarg�[39m, �[36msub�[39m, �[36mboss�[39m, �[36meqnull�[39m
JSHint globals: �[36m(none)�[39m
Reading src/components/titleService/titleService.spec.js...�[32mOK�[39m
Linting src/components/titleService/titleService.spec.js...�[32mOK�[39m
�[32m>> �[39m1 file lint free.

�[4mRunning "jshint:gruntfile" (jshint) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m
Verifying property �[36mjshint.gruntfile�[39m exists in config...�[32mOK�[39m
Files: �[36mGruntfile.js�[39m -> �[36mgruntfile�[39m
JSHint options: �[36mcurly�[39m, �[36mimmed�[39m, �[36mnewcap�[39m, �[36mnoarg�[39m, �[36msub�[39m, �[36mboss�[39m, �[36meqnull�[39m
JSHint globals: �[36m(none)�[39m
Reading Gruntfile.js...�[32mOK�[39m
Linting Gruntfile.js...�[32mOK�[39m
�[32m>> �[39m1 file lint free.

�[4mRunning "jshint:globals" (jshint) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m
Verifying property �[36mjshint.globals�[39m exists in config...�[32mOK�[39m
File: �[33m[no files]�[39m
JSHint options: �[36mcurly�[39m, �[36mimmed�[39m, �[36mnewcap�[39m, �[36mnoarg�[39m, �[36msub�[39m, �[36mboss�[39m, �[36meqnull�[39m
JSHint globals: �[36m(none)�[39m
�[32m>> �[39m0 files lint free.

�[4mRunning "karma:continuous" (karma) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/tasks/grunt-karma.js�[39m
Verifying property �[36mkarma.continuous�[39m exists in config...�[32mOK�[39m
File: �[33m[no files]�[39m
�[32mINFO [karma]: �[39mKarma server started at http://localhost:9018/
�[32mINFO [launcher]: �[39mStarting browser Firefox
�[32mINFO [Firefox 20.0 (Linux)]: �[39mConnected on socket id _QqgqUIC3VQb1-EgBnJF
...
Firefox 20.0 (Linux): Executed 3 of 3�[32m SUCCESS�[39m (0.299 secs / 0.026 secs)

�[4mRunning "concat" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/tasks/concat.js�[39m

�[4mRunning "concat:dist" (concat) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/tasks/concat.js�[39m
Verifying property �[36mconcat.dist�[39m exists in config...�[32mOK�[39m
Files: �[36mmodule.prefix�[39m, �[36msrc/app/about/about.js�[39m, �[36msrc/app/app.js�[39m, �[36msrc/app/home/home.js�[39m, �[36msrc/app/membership/membership.js�[39m, �[36msrc/components/cpcService/cpcService.js�[39m, �[36msrc/components/titleService/titleService.js�[39m, �[36mdist/tmp/about/about.tpl.html.js�[39m, �[36mdist/tmp/app.templates.js�[39m, �[36mdist/tmp/component.templates.js�[39m, �[36mdist/tmp/home/home.tpl.html.js�[39m, �[36mdist/tmp/membership/membership.tpl.html.js�[39m, �[36mvendor/jquery/jquery.js�[39m, �[36mvendor/angular-bootstrap/ui-bootstrap-tpls.min.js�[39m, �[36mvendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js�[39m, �[36mvendor/angular-ui-utils/modules/route/route.js�[39m, �[36mvendor/angular-ui-utils/modules/validate/validate.js�[39m, �[36mvendor/angular-ui-router/build/angular-ui-states.js�[39m, �[36mvendor/firebase/firebase-v0-130512.js�[39m, �[36mvendor/angularFire/angularFire-130512.js�[39m, �[36mvendor/bootstrap/js/bootstrap-transition.js�[39m, �[36mvendor/bootstrap/js/bootstrap-alert.js�[39m, �[36mvendor/bootstrap/js/bootstrap-button.js�[39m, �[36mvendor/bootstrap/js/bootstrap-carousel.js�[39m, �[36mvendor/bootstrap/js/bootstrap-collapse.js�[39m, �[36mvendor/bootstrap/js/bootstrap-dropdown.js�[39m, �[36mvendor/bootstrap/js/bootstrap-modal.js�[39m, �[36mvendor/bootstrap/js/bootstrap-tooltip.js�[39m, �[36mvendor/bootstrap/js/bootstrap-popover.js�[39m, �[36mvendor/bootstrap/js/bootstrap-scrollspy.js�[39m, �[36mvendor/bootstrap/js/bootstrap-tab.js�[39m, �[36mvendor/bootstrap/js/bootstrap-typeahead.js�[39m, �[36mvendor/bootstrap/js/bootstrap-affix.js�[39m, �[36mmodule.suffix�[39m -> �[36mdist/assets/clean-power-circle.js�[39m
Reading module.prefix...�[32mOK�[39m
Reading src/app/about/about.js...�[32mOK�[39m
Reading src/app/app.js...�[32mOK�[39m
Reading src/app/home/home.js...�[32mOK�[39m
Reading src/app/membership/membership.js...�[32mOK�[39m
Reading src/components/cpcService/cpcService.js...�[32mOK�[39m
Reading src/components/titleService/titleService.js...�[32mOK�[39m
Reading dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/app.templates.js...�[32mOK�[39m
Reading dist/tmp/component.templates.js...�[32mOK�[39m
Reading dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Reading vendor/jquery/jquery.js...�[32mOK�[39m
Reading vendor/angular-bootstrap/ui-bootstrap-tpls.min.js...�[32mOK�[39m
Reading vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js...�[32mOK�[39m
Reading vendor/angular-ui-utils/modules/route/route.js...�[32mOK�[39m
Reading vendor/angular-ui-utils/modules/validate/validate.js...�[32mOK�[39m
Reading vendor/angular-ui-router/build/angular-ui-states.js...�[32mOK�[39m
Reading vendor/firebase/firebase-v0-130512.js...�[32mOK�[39m
Reading vendor/angularFire/angularFire-130512.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-transition.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-alert.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-button.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-carousel.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-collapse.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-dropdown.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-modal.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-tooltip.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-popover.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-scrollspy.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-tab.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-typeahead.js...�[32mOK�[39m
Reading vendor/bootstrap/js/bootstrap-affix.js...�[32mOK�[39m
Reading module.suffix...�[32mOK�[39m
Writing dist/assets/clean-power-circle.js...�[32mOK�[39m
File "dist/assets/clean-power-circle.js" created.

�[4mRunning "concat:libs" (concat) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/tasks/concat.js�[39m
Verifying property �[36mconcat.libs�[39m exists in config...�[32mOK�[39m
Files: �[36mbuild/angular/angular.js�[39m -> �[36mdist/assets/libs.js�[39m
Reading build/angular/angular.js...�[32mOK�[39m
Writing dist/assets/libs.js...�[32mOK�[39m
File "dist/assets/libs.js" created.

�[4mRunning "ngmin:dist" (ngmin) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-ngmin/tasks/ngmin.js�[39m
Verifying property �[36mngmin.dist�[39m exists in config...�[32mOK�[39m
Files: �[36mdist/assets/clean-power-circle.js�[39m -> �[36mdist/assets/clean-power-circle.annotated.js�[39m
ngminifying �[36mdist/assets/clean-power-circle.js�[39m
Reading dist/assets/clean-power-circle.js...�[32mOK�[39m
Writing dist/assets/clean-power-circle.annotated.js...�[32mOK�[39m

�[4mRunning "uglify" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/tasks/uglify.js�[39m

�[4mRunning "uglify:dist" (uglify) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/tasks/uglify.js�[39m
Verifying property �[36muglify.dist�[39m exists in config...�[32mOK�[39m
Files: �[36mdist/assets/clean-power-circle.annotated.js�[39m -> �[36mdist/assets/clean-power-circle.min.js�[39m
Minifying with UglifyJS...Reading dist/assets/clean-power-circle.annotated.js...�[32mOK�[39m
�[32mOK�[39m
Writing dist/assets/clean-power-circle.min.js...�[32mOK�[39m
File "dist/assets/clean-power-circle.min.js" created.

�[4mRunning "recess" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/tasks/recess.js�[39m

�[4mRunning "recess:build" (recess) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/tasks/recess.js�[39m
Verifying property �[36mrecess.build�[39m exists in config...�[32mOK�[39m
Files: �[36msrc/less/main.less�[39m -> �[36mdist/assets/clean-power-circle.css�[39m
Writing dist/assets/clean-power-circle.css...�[32mOK�[39m
File "dist/assets/clean-power-circle.css" created.
Uncompressed size: �[32m154271�[39m bytes.
Compressed size: �[32m17504�[39m bytes gzipped (�[32m128105�[39m bytes minified).

�[4mRunning "index" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/Gruntfile.js�[39m
Reading src/index.html...�[32mOK�[39m
Processing source...�[32mOK�[39m
Writing dist/index.html...�[32mOK�[39m

�[4mRunning "copy" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/tasks/copy.js�[39m

�[4mRunning "copy:assets" (copy) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/tasks/copy.js�[39m
Verifying property �[36mcopy.assets�[39m exists in config...�[32mOK�[39m
Files: �[36msrc/assets�[39m -> �[36mdist/assets/�[39m
Files: �[36msrc/assets/font-awesome-ie7.min.css�[39m -> �[36mdist/assets/font-awesome-ie7.min.css�[39m
Files: �[36msrc/assets/fonts�[39m -> �[36mdist/assets/fonts�[39m
Files: �[36msrc/assets/fonts/FontAwesome.otf�[39m -> �[36mdist/assets/fonts/FontAwesome.otf�[39m
Files: �[36msrc/assets/fonts/Roboto-Regular.woff�[39m -> �[36mdist/assets/fonts/Roboto-Regular.woff�[39m
Files: �[36msrc/assets/fonts/fontawesome-webfont.eot�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.eot�[39m
Files: �[36msrc/assets/fonts/fontawesome-webfont.svg�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.svg�[39m
Files: �[36msrc/assets/fonts/fontawesome-webfont.ttf�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.ttf�[39m
Files: �[36msrc/assets/fonts/fontawesome-webfont.woff�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.woff�[39m
Files: �[36msrc/assets/imgs�[39m -> �[36mdist/assets/imgs�[39m
Files: �[36msrc/assets/imgs/jumbotron-bg.jpg�[39m -> �[36mdist/assets/imgs/jumbotron-bg.jpg�[39m
Options: �[36mprocessContent=false�[39m, �[36mprocessContentExclude=[]�[39m
Creating �[36mdist/assets/�[39m
Copying �[36msrc/assets/font-awesome-ie7.min.css�[39m -> �[36mdist/assets/font-awesome-ie7.min.css�[39m
Reading src/assets/font-awesome-ie7.min.css...�[32mOK�[39m
Writing dist/assets/font-awesome-ie7.min.css...�[32mOK�[39m
Creating �[36mdist/assets/fonts�[39m
Copying �[36msrc/assets/fonts/FontAwesome.otf�[39m -> �[36mdist/assets/fonts/FontAwesome.otf�[39m
Reading src/assets/fonts/FontAwesome.otf...�[32mOK�[39m
Writing dist/assets/fonts/FontAwesome.otf...�[32mOK�[39m
Copying �[36msrc/assets/fonts/Roboto-Regular.woff�[39m -> �[36mdist/assets/fonts/Roboto-Regular.woff�[39m
Reading src/assets/fonts/Roboto-Regular.woff...�[32mOK�[39m
Writing dist/assets/fonts/Roboto-Regular.woff...�[32mOK�[39m
Copying �[36msrc/assets/fonts/fontawesome-webfont.eot�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.eot�[39m
Reading src/assets/fonts/fontawesome-webfont.eot...�[32mOK�[39m
Writing dist/assets/fonts/fontawesome-webfont.eot...�[32mOK�[39m
Copying �[36msrc/assets/fonts/fontawesome-webfont.svg�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.svg�[39m
Reading src/assets/fonts/fontawesome-webfont.svg...�[32mOK�[39m
Writing dist/assets/fonts/fontawesome-webfont.svg...�[32mOK�[39m
Copying �[36msrc/assets/fonts/fontawesome-webfont.ttf�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.ttf�[39m
Reading src/assets/fonts/fontawesome-webfont.ttf...�[32mOK�[39m
Writing dist/assets/fonts/fontawesome-webfont.ttf...�[32mOK�[39m
Copying �[36msrc/assets/fonts/fontawesome-webfont.woff�[39m -> �[36mdist/assets/fonts/fontawesome-webfont.woff�[39m
Reading src/assets/fonts/fontawesome-webfont.woff...�[32mOK�[39m
Writing dist/assets/fonts/fontawesome-webfont.woff...�[32mOK�[39m
Creating �[36mdist/assets/imgs�[39m
Copying �[36msrc/assets/imgs/jumbotron-bg.jpg�[39m -> �[36mdist/assets/imgs/jumbotron-bg.jpg�[39m
Reading src/assets/imgs/jumbotron-bg.jpg...�[32mOK�[39m
Writing dist/assets/imgs/jumbotron-bg.jpg...�[32mOK�[39m
Created �[36m3�[39m directories, copied �[36m8�[39m files

�[4mRunning "copy:bin" (copy) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/tasks/copy.js�[39m
Verifying property �[36mcopy.bin�[39m exists in config...�[32mOK�[39m
Files: �[36mbin�[39m -> �[36mdist/�[39m
Files: �[36mbin/server.js�[39m -> �[36mdist/server.js�[39m
Options: �[36mprocessContent=false�[39m, �[36mprocessContentExclude=[]�[39m
Creating �[36mdist/�[39m
Copying �[36mbin/server.js�[39m -> �[36mdist/server.js�[39m
Reading bin/server.js...�[32mOK�[39m
Writing dist/server.js...�[32mOK�[39m
Created �[36m1�[39m directories, copied �[36m1�[39m files

�[4mRunning "karma:unit" (karma) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/tasks/grunt-karma.js�[39m
Verifying property �[36mkarma.unit�[39m exists in config...�[32mOK�[39m
File: �[33m[no files]�[39m

�[4mRunning "delta" task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-watch/tasks/watch.js�[39m
Waiting...Verifying property �[36mdelta�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.gruntfile.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.src.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.assets.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.html.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.tpls.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.less.files�[39m exists in config...�[32mOK�[39m
Verifying property �[36mdelta.unittest.files�[39m exists in config...�[32mOK�[39m
Live reload server started on port: 35729
Watching Gruntfile.js for changes.
Watching src/index.html for changes.
Watching src/assets/font-awesome-ie7.min.css for changes.
Watching src/assets/fonts for changes.
Watching src/assets/imgs for changes.
Watching src/assets/fonts/FontAwesome.otf for changes.
Watching src/assets/fonts/Roboto-Regular.woff for changes.
Watching src/assets/fonts/fontawesome-webfont.eot for changes.
Watching src/assets/fonts/fontawesome-webfont.svg for changes.
Watching src/assets/fonts/fontawesome-webfont.ttf for changes.
Watching src/assets/fonts/fontawesome-webfont.woff for changes.
Watching src/assets/imgs/jumbotron-bg.jpg for changes.
Watching src/app/about/about.tpl.html for changes.
Watching src/app/home/home.tpl.html for changes.
Watching src/app/membership/membership.tpl.html for changes.
Watching src/app/about/about.js for changes.
Watching src/app/app.js for changes.
Watching src/app/home/home.js for changes.
Watching src/app/membership/membership.js for changes.
Watching src/components/cpcService/cpcService.js for changes.
Watching src/components/titleService/titleService.js for changes.
Watching src/app/about/about.less for changes.
Watching src/app/home/home.less for changes.
Watching src/app/membership/membership.less for changes.
Watching src/less/font-awesome.less for changes.
Watching src/less/main.less for changes.
Watching src/less/variables.less for changes.
Watching src/components/titleService/titleService.spec.js for changes.
�[32mOK�[39m
�[32m>> �[39mFile "src/app/membership/membership.js" changed.
�[4mInitializing�[24m
Command-line options: �[36m--verbose�[39m, �[36m--debug=1�[39m

Reading "Gruntfile.js" Gruntfile...�[32mOK�[39m

�[1mRegistering Gruntfile tasks.�[22m

�[1mRegistering "grunt-recess" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-recess/package.json...�[32mOK�[39m
Loading "recess.js" tasks...�[32mOK�[39m

  • �[36mrecess�[39m

�[1mRegistering "grunt-contrib-clean" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-clean/package.json...�[32mOK�[39m
Loading "clean.js" tasks...�[32mOK�[39m

  • �[36mclean�[39m

�[1mRegistering "grunt-contrib-copy" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-copy/package.json...�[32mOK�[39m
Loading "copy.js" tasks...�[32mOK�[39m

  • �[36mcopy�[39m

�[1mRegistering "grunt-contrib-jshint" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/package.json...�[32mOK�[39m
Loading "jshint.js" tasks...�[32mOK�[39m

  • �[36mjshint�[39m

�[1mRegistering "grunt-contrib-concat" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-concat/package.json...�[32mOK�[39m
Loading "concat.js" tasks...�[32mOK�[39m

  • �[36mconcat�[39m

�[1mRegistering "grunt-contrib-watch" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-watch/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-watch/package.json...�[32mOK�[39m
Loading "watch.js" tasks...�[32mOK�[39m

  • �[36mwatch�[39m

�[1mRegistering "grunt-contrib-uglify" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-uglify/package.json...�[32mOK�[39m
Loading "uglify.js" tasks...�[32mOK�[39m

  • �[36muglify�[39m

�[1mRegistering "grunt-karma" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/package.json...�[32mOK�[39m
Loading "grunt-karma.js" tasks...�[32mOK�[39m

  • �[36mkarma�[39m

�[1mRegistering "grunt-ngmin" local Npm module tasks.�[22m
Reading /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-ngmin/package.json...�[32mOK�[39m
Parsing /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-ngmin/package.json...�[32mOK�[39m
Loading "ngmin.js" tasks...�[32mOK�[39m

  • �[36mngmin�[39m

�[1mRegistering "grunt-tasks" tasks.�[22m
Loading "grunt-html2js.js" tasks...�[32mOK�[39m

  • �[36mhtml2js�[39m
    Reading package.json...�[32mOK�[39m
    Parsing package.json...�[32mOK�[39m
    Initializing config...�[32mOK�[39m
    Loading "Gruntfile.js" tasks...�[32mOK�[39m
  • �[36mwatch�[39m
  • �[36mbuild�[39m, �[36mdefault�[39m, �[36mdelta�[39m, �[36mindex�[39m, �[36mquick-build�[39m, �[36mwatch�[39m

Running tasks: �[36mjshint:src�[39m, �[36mkarma:unit:run�[39m, �[36mconcat:dist�[39m, �[36mngmin:dist�[39m, �[36muglify:dist�[39m

�[4mRunning "jshint:src" (jshint) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-contrib-jshint/tasks/jshint.js�[39m
Verifying property �[36mjshint.src�[39m exists in config...�[32mOK�[39m
Files: �[36mGruntfile.js�[39m, �[36msrc/app/about/about.js�[39m, �[36msrc/app/app.js�[39m, �[36msrc/app/home/home.js�[39m, �[36msrc/app/membership/membership.js�[39m, �[36msrc/components/cpcService/cpcService.js�[39m, �[36msrc/components/titleService/titleService.js�[39m, �[36mdist/tmp/about/about.tpl.html.js�[39m, �[36mdist/tmp/app.templates.js�[39m, �[36mdist/tmp/component.templates.js�[39m, �[36mdist/tmp/home/home.tpl.html.js�[39m, �[36mdist/tmp/membership/membership.tpl.html.js�[39m, �[36msrc/components/titleService/titleService.spec.js�[39m -> �[36msrc�[39m
JSHint options: �[36mcurly�[39m, �[36mimmed�[39m, �[36mnewcap�[39m, �[36mnoarg�[39m, �[36msub�[39m, �[36mboss�[39m, �[36meqnull�[39m
JSHint globals: �[36m(none)�[39m
Reading Gruntfile.js...�[32mOK�[39m
Linting Gruntfile.js...�[32mOK�[39m
Reading src/app/about/about.js...�[32mOK�[39m
Linting src/app/about/about.js...�[32mOK�[39m
Reading src/app/app.js...�[32mOK�[39m
Linting src/app/app.js...�[32mOK�[39m
Reading src/app/home/home.js...�[32mOK�[39m
Linting src/app/home/home.js...�[32mOK�[39m
Reading src/app/membership/membership.js...�[32mOK�[39m
Linting src/app/membership/membership.js...�[32mOK�[39m
Reading src/components/cpcService/cpcService.js...�[32mOK�[39m
Linting src/components/cpcService/cpcService.js...�[32mOK�[39m
Reading src/components/titleService/titleService.js...�[32mOK�[39m
Linting src/components/titleService/titleService.js...�[32mOK�[39m
Reading dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/about/about.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/app.templates.js...�[32mOK�[39m
Linting dist/tmp/app.templates.js...�[32mOK�[39m
Reading dist/tmp/component.templates.js...�[32mOK�[39m
Linting dist/tmp/component.templates.js...�[32mOK�[39m
Reading dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/home/home.tpl.html.js...�[32mOK�[39m
Reading dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Linting dist/tmp/membership/membership.tpl.html.js...�[32mOK�[39m
Reading src/components/titleService/titleService.spec.js...�[32mOK�[39m
Linting src/components/titleService/titleService.spec.js...�[32mOK�[39m
�[32m>> �[39m13 files lint free.

�[4mRunning "karma:unit:run" (karma) task�[24m
[D] �[35mTask source: /home/mao/dev/projects/clean-power-circle/clean-power-circle/node_modules/grunt-karma/tasks/grunt-karma.js�[39m
Verifying property �[36mkarma.unit�[39m exists in config...�[32mOK�[39m
File: �[33m[no files]�[39m

@firehist

Hey guys,
I got the same problem on karma:unit:run.

Please find below a my debug version for this task :

Running "karma:unit:run" (karma) task
[D] Task source: /MY_PROJECT/node_modules/grunt-karma/tasks/grunt-karma.js
Verifying property karma.unit exists in config...OK
File: [no files]

I'll try to find out smth but I think you'll be faster than me :)

[EDIT]: I forgot my config

  • Mac OS X 10.8
  • node: v0.10.3
  • grunt-cli: v0.1.8
  • grunt: v0.4.1
  • karma: v0.8.5

Thanks in advance.
Ben,

@ryanwersal

Just tested with grunt watch --verbose --debug and I'm seeing the same thing as @firehist:

Running "karma:unit:run" (karma) task
[D] Task source: /home/ryan/src/svn/metro/metro/client/node_modules/grunt-karma/tasks/grunt-karma.js
Verifying property karma.unit exists in config...OK
File: [no files]

Unfortunately I doubt that tells us much since that output is identical to the initial run of this task upon running grunt watch which succeeds.

@firehist

Hi @ryanwersal,

That's not exactly the same for grunt watch and watching task.
The first launched the following task: Running "karma:unit" (karma) task
The second launched: Running "karma:unit:run" (karma) task

@ryanwersal

And you're right. Knew I'd regret commenting on that. Thanks!

@firehist

Don't regret commenting on that!
Be happy to give feedback to this OpenSource project.
it'll help us to fix and improve it ;-D

Have a good day!

@joshdmiller
Member

Hmmm...it's pretty hard to troubleshoot a problem I'm not experiencing, but I do find the File: [no files] part interesting. Is this not working directly out of the box or after some changes are made? If you run a straight grunt, how many tests are executed?

@ryanwersal

@joshdmiller I'm able to reproduce this issue with a fresh clone setup in accordance with the Quick Start directions.

With that fresh clone, I also ran grunt --verbose --debug:

Running "karma:continuous" (karma) task
[D] Task source: /home/ryan/src/git/ng-boilerplate/node_modules/grunt-karma/tasks/grunt-karma.js
Verifying property karma.continuous exists in config...OK
File: [no files]
INFO [karma]: Karma server started at http://localhost:9018/
INFO [launcher]: Starting browser Firefox
INFO [Firefox 20.0 (Linux)]: Connected on socket id jX5Bi8cnDy18E1oBX3b0
.....
Firefox 20.0 (Linux): Executed 5 of 5 SUCCESS (0.117 secs / 0.018 secs)
@joshdmiller
Member

@ryanwersal So it executes all five tests and then ... stops? And it never gets to any step in the default task after karma:continuous?

Is anyone having this problem not on Ubuntu?

@ryanwersal

I just did another grunt watch --verbose --debug and put the entire output into this gist.

Essentially I ran that, waited until it finished everything and was just watching and then touched the home.js file. It whips through everything until getting to the "karma:unit:run" (karma) task where it grinds to a halt. Hopefully that will help shed some more light on whatever is going on here. Let me know if there is anything else I can do to help out on this. :)

I also put together a minimal environment in the form of a VM that can reproduce the issue as well. I currently have it uploading. If you feel it would be beneficial in helping reproduce this I can certainly send you a link for it sometime tomorrow.

EDIT: I'll try reproducing this on a non-Ubuntu based distribution or two tonight as well to see if we can at least isolate that variable.

@gregarious

I'm seeing the same behavior on Mac OS X 10.8 from a fresh clone of the project.

@leifhanack

I have the same problem on Mac 10.8 / node v0.10.5 / grunt-cli v0.1.8 / grunt v0.4.1 / Karma version: 0.8.5 and enabled karma debugging.

starting with a good case

When I start fresh and run grunt watch --verbose --debug every is fine.

starting with a good case and a) a new green test b) a failing test

When I start fresh and run grunt watch --verbose --debug and a) adding a new green test or b) making a test fail I got the following. After that console hangs.

Running "karma:unit:run" (karma) task
[D] Task source: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/tasks/grunt-karma.js
Verifying property karma.unit exists in config...OK
File: [no files]
DEBUG [karma]: Execution (fired by runner)
DEBUG [karma]: Refreshing all the files / patterns
DEBUG [karma]: All browsers are ready, executing
DEBUG [watcher]: Resolved files:
    /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/lib/jasmine.js
    /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/jasmine.js
    /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular.js
    /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular-mocks.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/about/about.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/app.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/app.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/plusOne/plusOne.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/about/about.tpl.html.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/app.templates.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/component.templates.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/home/home.tpl.html.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-ui-utils/modules/route/route.js

starting with a failing test

When I start with a failing test and then run grunt watch --verbose --debug I receive the following:

Verifying property karma.continuous exists in config...OK
File: [no files]
DEBUG [reporter]: Using reporter "dots".
INFO [karma]: Karma server started at http://localhost:9018/
INFO [launcher]: Starting browser PhantomJS
DEBUG [launcher]: Creating temp dir at /var/folders/mh/z7vn5ncd6cxgf_n966_s4kg00000gp/T/testacular-89863683
DEBUG [launcher]: /usr/local/bin/phantomjs /var/folders/mh/z7vn5ncd6cxgf_n966_s4kg00000gp/T/testacular-89863683/capture.js
DEBUG [watcher]: Resolved files:
    /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/lib/jasmine.js
    /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/jasmine.js
    /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular.js
    /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular-mocks.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/about/about.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/app.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/app.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.js
    /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/plusOne/plusOne.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.js
    /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.spec.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/about/about.tpl.html.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/app.templates.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/component.templates.js
    /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/home/home.tpl.html.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.min.js
    /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-ui-utils/modules/route/route.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/static/client.html
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/static/testacular.js
DEBUG [karma]: New browser has connected on socket V7zcVjUn_JbnuqrNklP7
INFO [PhantomJS 1.9 (Mac)]: Connected on socket id V7zcVjUn_JbnuqrNklP7
DEBUG [karma]: All browsers are ready, executing
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/static/context.html
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/lib/jasmine.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/node_modules/grunt-karma/node_modules/karma/adapter/jasmine.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/app/about/about.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/build/angular/angular-mocks.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/app/app.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/app/app.spec.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/app/home/home.spec.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/components/titleService/titleService.spec.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/src/components/plusOne/plusOne.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/about/about.tpl.html.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/app.templates.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/component.templates.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/dist/tmp/home/home.tpl.html.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/placeholders/angular-placeholders-0.0.1-SNAPSHOT.min.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap-tpls.min.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-bootstrap/ui-bootstrap.min.js
DEBUG [web server]: serving: /Users/leif.hanack/projects/ng-boilerplate/vendor/angular-ui-utils/modules/route/route.js
PhantomJS 1.9 (Mac) AppCtrl isCurrentUrl should pass a dummy test FAILED
    Expected {  } to be falsy.
.....
PhantomJS 1.9 (Mac): Executed 6 of 6 (1 FAILED) (0.087 secs / 0.019 secs)
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing PhantomJS
DEBUG [launcher]: Process PhantomJS exitted with code 0
DEBUG [launcher]: Cleaning temp dir /var/folders/mh/z7vn5ncd6cxgf_n966_s4kg00000gp/T/testacular-89863683
Warning: Task "karma:continuous" failed. Use --force to continue.

Aborted due to warnings.

What else can I do to help?

@wackazong

I have the same problem on OS X 10.8.3.

@leifhanack

@wackazong In my case it was based on a error in my DNS resolution. Post http://blog.strug.de/2013/05/fixing-slow-dns-resolution-on-mac-10-8/ describes the solution that works for me.

@wdalrymple

I have a windows 8 machine and I am seeing the following running grunt watch --verbose --debug
I also removed the 'firefox' browser reference from the karma script.

.....
[D] Task source: C:\dev\projects\nodejs\boilerlearn\node_modules\grunt-contrib-j
shint\tasks\jshint.js
Verifying property jshint.globals exists in config...OK
File: [no files]
JSHint options: curly, immed, newcap, noarg, sub, boss, eqnull
JSHint globals: (none)

0 files lint free.

Running "karma:continuous" (karma) task
[D] Task source: C:\dev\projects\nodejs\boilerlearn\node_modules\grunt-karma\tas
ks\grunt-karma.js
Verifying property karma.continuous exists in config...OK
File: [no files]
INFO [karma]: Karma server started at http://localhost:9018/
INFO [Firefox 21.0 (Windows)]: Connected on socket id Ri4Vyti9nC4NQlNVEUdR
Firefox 21.0 (Windows) ERROR
ReferenceError: require is not defined
at C:/dev/projects/nodejs/boilerlearn/vendor/angular-bootstrap/Gruntfile
.js:1
Firefox 21.0 (Windows): Executed 0 of 0 ERROR (0.171 secs / 0 secs)
Warning: Task "karma:continuous" failed. Use --force to continue.

Aborted due to warnings.

@wackazong

@leifhanack my /etc/hosts file seems ok, but where would I set 127.0.0.1 instead of localhost?

@wackazong

Now, this is strange. I watched the browsers that are started for my tests when I run grunt watch. The normal procedure is: the buildtask is started, and then the delta task is started. I integrated some e2e tests as well as done here: rolaveric@444c9c4.

Both tests in the build task work fine, first unit tests, then e2e tests. But I noticed that the port number is counting up in the browser. So for the first unit test run (singleRun=true) the port is as defined in the karma config file: 9018. For the e2e tests it is 9019, and when after that the Karma server is started in background mode for the watch task, the port is 9020. Is that normal?

When I remove both test runs from the build task, the Karma server for the watch task is started on port 9018 unit testing works and does not hang....

The problem persists if I remove the e2e tests BTW.

@wenihal
wenihal commented Jun 2, 2013

I have the same issue, running on Windows 7.

When I change any html file I see "Done, without errors.".
When I change any js file I see "Running "karma:unit:run" (karma) task" and nothing more. When I hit ctrl+c once I see:

Fatal error: read ECONNRESET
ERROR [karma]: { [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
Error: read ECONNRESET
    at errnoException (net.js:884:11)
    at TCP.onread (net.js:539:19)
Running "delta" task
Waiting...Warning: Task "karma:continuous" failed.
Running "delta" task
Waiting...

Hope this helps.

@leifhanack

@wackazong never tried it, but maybe it works when you set the proxy inside your karma config:

proxies =  {
    '/': 'http://127.0.0.1:<yourKarmaPort>'
};
@juliangarnier

I'm not sure if this is related, but when I try to run grunt watch on a clean install (I have the karma:unit:run task problem too btw) grunt watch hangs on "delta" task (firefox il launched, no problems here, but terminal hangs on Waiting...).
I need to make a change and save a file (or simply save a file) to make the grunt watch continue.

I'm using OS X 10.8.3.

@juliangarnier

@leifhanack @wackazong tried to use proxies as suggested :

    karma: {
      proxies: {
        '/': 'http://127.0.0.1:9018'
      },
      options: {
        configFile: 'karma/karma-unit.js'
      },
      unit: {
        background: true
      },
      continuous: {
        singleRun: true
      }
    },

But the problem is still there

@vhpoet
vhpoet commented Jun 8, 2013

Same here.. Tried with different settings. firefox, chrome, suggested proxy, changed ports, checked /etc/hosts

@helmi03
helmi03 commented Jun 11, 2013

Try use different runnerPort, e.g.

karma: {
      options: {
        configFile: 'karma/karma-unit.js'
      },
      unit: {
        runnerPort: 9101,
        background: true
      },
      continuous: {
        singleRun: true
      }
    },

works for me on browser Firefox, Ubuntu 12.04, Karma version: 0.8.5, nodejs 0.10.10

@karol-f
karol-f commented Jun 14, 2013

@helmi03 This helped on Ubuntu, thanks!

@thardy
thardy commented Jun 15, 2013

I'm seeing this same issue on Windows 7 64bit, with Firefox 21, Karma 0.8.5, and Node 0.10.11. I grab a clean clone of the repo, follow the instructions, run grunt watch --verbose --debug, and everything works fine. The moment I change any spec to have a failing test, I get...

Running "karma:unit:run" (karma) task
[D] Task source: D:\dev\Prototype\ng-boilerplate\node_modules\grunt-karma\tasks\grunt-karma.js
Verifying property karma.unit exists in config...OK
File: [no files]

In my case I can't even ctrl-c, but that happens with anything that hangs in my console2 hosted Powershell. I have to close that console window/tab and open a new one.

@thardy thardy referenced this issue in karma-runner/grunt-karma Jun 17, 2013
Open

grunt watch hangs on karma:unit:run task #33

@amatiasq
Contributor

@helmi03 This works on MacOS 10.7.5
Thanks!

@joshdmiller joshdmiller added a commit that closed this issue Jun 18, 2013
@amatiasq @joshdmiller amatiasq + joshdmiller Karma runner port to 9101, fixing watch issues
Credit to @helmi03.

Tested on:
 - MacOS 10.7.5 (Karma 0.8.5, NodeJS 0.10.4)
 - Ubuntu 12.04 (Karma 0.8.5, NodeJS 0.10.10)
 - Arch Linux (Karma 0.8.5, NodeJS 0.10.10)

Fixes #37. Fixes #20.
f66cfcc
@supermensa

I had this same problem on MacOS 10.8.4 with a fresh clone. Changed browser to Safari in karma-unit.js to make it work.

@amatiasq
Contributor

Maybe you have port 9101 busy, can yo change it to another port like 9111?

@thardy
thardy commented Jun 26, 2013

I'm still having the same problem after trying several ports - 9101, 9111, etc. I also grabbed the latest grunt-karma (0.4.5), but that didn't help either. I'm on Windows 7 x64. Just to be clear, I'm changing the "runnerport" in the following files (karma-unit.js, config.template, and constants.js). Those are all the files that have a runnerport.

@thardy
thardy commented Jun 26, 2013

Still have the problem after switching from firefox to chrome as well.

@joshdmiller
Member

Alright, I gave no idea what's going on here. It works for me now, but clearly not fit everyone. I'm reopening this issue. Can anyone who is still experiencing this issue link to their code base? I'd like to check out the setups. Also be sure to post your operating systems.

@joshdmiller joshdmiller reopened this Jun 26, 2013
@thardy
thardy commented Jun 26, 2013

I'll try to put together a minimal example tomorrow and post it.

@thardy
thardy commented Jun 26, 2013

I started from scratch on a totally different windows machine, and after a few hiccups with node (I had an older version already installed), I was able to get everything working on that machine. Starting from scratch on my original machine is now working as well. Either the new ng-boilerplate, or the new karma in a clean repo is working on my Windows 7 box now (no need to change ports or anything). Another thing to note is that I upgraded my node.js to the latest in both cases - v0.10.12.

Thank you for your involvement in this issue. In my case, it's gone.

@joshdmiller
Member

@thardy I'm glad this works for you. Can you confirm that the tests are indeed running? I'm not convinced that the right Karma server is launching for some people. In the terminal during a watch, you should see the Karma step run and give the number of tests; make sure it's not silently failing with some message like there were no browsers connected. That tripped me up when I was trying to solve this problem.

Otherwise, the only change to v0.3 that I can think would affect this would be the port change, which does seem to work for some people. But still, this issue is just hinky enough to make me nervous.

@thardy
thardy commented Jun 27, 2013

I know that Karma made a fix in this same area this week or late last week - something about a null ref. Even though I grabbed it back then, it was starting everything over from scratch, including the latest node that made the error go away for me. I'm sorry I wasn't able to find a smoking gun.

I'm pretty sure the tests are running. Here's the new output...

Completed in 0.839s at Thu Jun 27 2013 00:28:15 GMT-0500 (Central Daylight Time) - Waiting...
OK

File "src\app\app.js" changed.

Running "jshint:src" (jshint) task

5 files lint free.

Running "karma:unit:run" (karma) task
.....
Firefox 22.0.0 (Windows 7): Executed 5 of 5 SUCCESS (0.132 secs / 0.022 secs)

Running "copy:build_appjs" (copy) task
Copied 5 files

Done, without errors.
... Reload src\app\app.js ...
... Reload src\app\app.js ...
Completed in 1.018s at Thu Jun 27 2013 00:29:01 GMT-0500 (Central Daylight Time) - Waiting...

@thardy
thardy commented Jun 28, 2013

Thanks for all of your help. Where’s the proper place to ask generic ng-boilerplate questions? I’ve posted the following on stackoverflow, but let me know if there’s someplace more appropriate - (http://stackoverflow.com/questions/17358299/ng-boilerplate-why-are-my-new-js-files-and-tpl-html-files-not-being-monitored).

@RichardLitt

I'm getting the same issue as @juliangarnier above. It stalls on running: Delta task, and a Ctrl+C prints out that it is done without errors, which doesn't seem right.

...
18:15 ~/Github/ng-boilerplate $ grunt watch
Running "clean:0" (clean) task

Running "clean:1" (clean) task

Running "html2js:app" (html2js) task
Successfully converted 1 html templates to js.

Running "html2js:common" (html2js) task
Successfully converted 1 html templates to js.

Running "jshint:src" (jshint) task

4 files lint free.

Running "jshint:test" (jshint) task

2 files lint free.

Running "jshint:gruntfile" (jshint) task

1 file lint free.

Running "jshint:globals" (jshint) task

0 files lint free.

Running "coffeelint:src" (coffeelint) task

1 file lint free.

Running "coffeelint:test" (coffeelint) task

1 file lint free.

Running "coffee:source" (coffee) task
File build/src/common/titleService/titleService.js created.

Running "recess:build" (recess) task
File "build/assets/ng-boilerplate.css" created.

Running "copy:build_assets" (copy) task
Created 1 directories, copied 1 files

Running "copy:build_appjs" (copy) task
Copied 4 files

Running "copy:build_vendorjs" (copy) task
Copied 5 files

Running "index:build" (index) task

Running "karmaconfig:unit" (karmaconfig) task

Running "karma:continuous" (karma) task
WARN [config]: config.configure() is deprecated, please use config.set() instead.
INFO [karma]: Karma v0.9.4 server started at http://localhost:9018/
INFO [launcher]: Starting browser Firefox
INFO [Firefox 17.0.0 (Mac OS X 10.8)]: Connected on socket id yWlazxCvpGoYbh2jkNze
.....
Firefox 17.0.0 (Mac OS X 10.8): Executed 5 of 5 SUCCESS (0.114 secs / 0.019 secs)

Running "karma:unit" (karma) task

Running "delta" task
Waiting...
^C
Done, without errors.

@jbelcher
jbelcher commented Aug 6, 2013

Same issues as above (Files[] is empty on verbose/debug output, nothing weird with ports or dns). Running:

OSX: 10.8.4
Karma: 0.9.8
grunt-karma: 0.5.1
grunt: 0.4.1
node: 0.10.15

Clean clone of repo.

@kirimi
kirimi commented Aug 8, 2013

I have also same issue. osx 10.8.4 node 0.10.15 Clean clone of repo.

but after 2 minutes of waiting: Fatal error: socket hang up
and when i change some file: Waiting for previous execution...

Running "karma:unit:run" (karma) task
[2013-08-08 12:32:06.485] [DEBUG] config - Loading config /Users/a/work/legion/kcApp/build/karma-unit.js
[2013-08-08 12:32:06.496] [WARN] config - config.configure() is deprecated, please use config.set() instead.
Fatal error: socket hang up
Completed in 125.343s at Thu Aug 08 2013 12:34:06 GMT+0400 (MSK) - Waiting...

File "src/app/home/home.js" changed.

Running "jshint:src" (jshint) task

4 files lint free.

Running "karma:unit:run" (karma) task
[2013-08-08 12:39:04.032] [DEBUG] config - Loading config /Users/a/work/legion/kcApp/build/karma-unit.js
[2013-08-08 12:39:04.035] [WARN] config - config.configure() is deprecated, please use config.set() instead.
INFO [karma]: Delaying execution, these browsers are not ready: Firefox 15.0.1 (Mac OS X 10.8)
Waiting for previous execution...

@brianmriley

UPDATE: Made the following changes and it's working -- worked with @agscheidle on this patch/workaround:

  • Open "grunt-karma.js", located here: /ng-boilerplate/node_modules/grunt-karma/tasks/grunt-karma.js
  • Change background: false -> true. This was on or around line 20.
  • Change background: var data = this.data; -> var data = {};. This was on or around line 22.
  • Execute grunt watch and it succeeds.

NOTE: If I had failing tests in there it didn't show the first time. I had to touch (aka make a JS file change) for the tests to actually show the errors (by forcing it to run 'karma:unit:run' again).

NOTE: The second change of the var data to an empty object doesn't feel right, but it did seem to work.


+1 for the same issue as kirimi and others above. Setup:

  • Mac OS X 10.8.4
  • node: v0.10.15
  • grunt-cli: v0.1.9
  • grunt: v0.4.1
  • karma: 0.10.1
  • chrome: Version 28.0.1500.95
  • Clean clone of repo

Running grunt watch immediately after a clean setup works. As soon as you makes changes to a JS file -- in my case I made the stubbed out spec in home.spec.js fail by changing true to false -- it hangs.

If i kill the process and restart grunt watch with the same failed home spec it does show the failed test in the console but also immediately shuts down the process.

Chrome 28.0.1500 (Mac OS X 10.8.4): Executed 5 of 5 (1 FAILED) (0.14 secs / 0.028 secs)
Warning: Task "karma:continuous" failed. Use --force to continue.

Aborted due to warnings.

If I revert the failed home spec to pass it works again. If I add an additional passing home spec it bombs again.

Here are several things I tried to no avail:

  • Used both default browser Firefox and Chrome -- both by themselves.
  • Changed the port and portRunner to several diff values.
  • Pulled down clean version and didn't open WebStorm or IntelliJ in case I had them using ports or messing with the browsers and ran all from the cmd line without anything else open.
  • Restart my laptop to make sure no other processes were using any of the ports I tried.

Something else of note is that when the tests do pass the very first time I see the browser open with the port specified, then close and reopen with my port +1; the browser started with my port number of 9999 and then second time it opened with 10000 all in the same process. Also noticed that it was using port and not my runnerPort value of 9998, or is that expected?

@agscheidle

I was able to achieve some success by making some minor changes. I didn't test robustly, but it appears to have resolved this issue for me. Here's what I did:

  1. In \node_modules\grunt_karma\grunt-karma.js, change var data = this.data;
    to: var data = {}
  2. In the same class, change background: false to background: true inside of the this.options object.

Doing the above fixed two problems/annoyances for me.

  1. Resolved the 'Aborted due to warnings' message - while I didn't explore deeply, I suspect that this.data was possibly null thus causing some problem elsewhere.
  2. Put an end to the browser start-close-re-start I was experiencing with starting grunt watch
@joshdmiller joshdmiller referenced this issue in karma-runner/grunt-karma Aug 9, 2013
Closed

Causes grunt-contrib-watch to stop #30

@dimsuz
dimsuz commented Aug 10, 2013

@agscheidle your workaround worked for me too!

@joelhooks

This definitely works, but causes two browsers to open and doesn't run tests the first time. Makes me sad to dig into the node_modules like this.

Thanks for finding the work-around though @agscheidle and @brianmriley. Very useful band-aid.

@ToucheSir

After a good chunk of time checking logs, opening up modules and banging my head against a wall, I found a rather trivial solution that worked for me. By adding a port attribute in the karma:unit config, grunt watch seems to work.

Here's the Karma configuration from my gruntfile (nothing else is changed from default ng-boilerplate):

    karma: {
      options: {
        configFile: '<%= build_dir %>/karma-unit.js'
      },
      unit: {
        background: true,
        port: 9877 // IMPORTANT!
      },
      continuous: {
        background: false,
        singleRun: true
      }
    },

The port specified under karma:unit is the karma:continuous port+1 (not sure if it's due to background: true). For some reason, grunt-karma doesn't realize the port to run on has changed for background tasks.

Anyways, this worked for me. Might try with a clean repo in case I modified something in node_modules...

@jonathanmoffatt

The solution proposed by @ToucheSir did the trick for me.

@cornelius-keller

+1 for @ToucheSir Solution.

@grantlucas

👍 @ToucheSir

In my case, I was using a recent 0.3 ngBoilerplate upgrade so was using all the latest files from this repo. Adding port: 9877 did the trick! So my final setup for Karma configuration in Gruntfile.js is

/**
 * The Karma configurations.
 */
karma: {
  options: {
    configFile: '<%= build_dir %>/karma-unit.js'
  },
  unit: {
    runnerPort: 9101,
    background: true,
    port: 9877
  },
  continuous: {
    singleRun: true
  }
},
@ToucheSir

@grantlucas : runnerPort no longer exists in karma > = 0.9.6 (which might be why it's necessary to specifiy the port instead). :-)

I'm thinking of making a pr for this, but karma seems to think that no config file was loaded for the unit testing ("config required" message). It doesn't seem to affect anything, however. Anybody else seeing this?

@grantlucas

@ToucheSir Ahhh Thanks! That definitely needs to be updated in master 😄

@ryano144

I am just started using v0.3 of ngBoilerplate, and I was having problems with Karma exiting after a javascript file changed. I noticed that Karma was being started twice during a run of grunt watch, once with :continuous and once with :unit. I was able to get around this issue (and #20) by removing karma:continuous from the build task, and moving it to the compile task, leaving me with:

grunt.registerTask( 'watch', [ 'build', 'karma:unit', 'delta' ] );

 /**
 * The default task is to build and compile.
 */
grunt.registerTask( 'default', [ 'build', 'karma:continuous', 'compile' ] );

/**
 * The `build` task gets your app ready to run for development and testing.
 */
grunt.registerTask( 'build', [
  'clean', 'html2js', 'jshint', 'coffeelint', 'coffee','recess:build',
  'copy:build_assets', 'copy:build_appjs', 'copy:build_vendorjs',
  'index:build', 'karmaconfig' 
]);
@daxborges

+1 for @ToucheSir Solution.

@alwc
alwc commented Aug 21, 2013

@RichardLitt @juliangarnier @jbelcher i've tried @ToucheSir 's and @agscheidle 's solution, but it stalls on "Running "delta" task...Waiting...". I've tried with a clean clone, but to no avail. Did you guys figure out any other solutions? Thanks.

@ToucheSir

@alwc Can you show you config file? Also, what do you mean by "stalls"?

@RichardLitt

@alwc I'm still getting the 'waiting...' message on 'running delta' as well.

@maxneust

+1 for @ToucheSir solution as well, thanks!

@alwc
alwc commented Aug 22, 2013

Hi @ToucheSir , I'm currently using your Karma config in my Gruntfile.js and that's the only change I've made in my ng-boilerplate clone.

Basically, after I "npm install", "bower install" and edited the port that you've suggested in my Gruntfile.js, here is my "grunt watch" result:

https://gist.github.com/alwc/6308047

It stalls at:

"Running "delta" task
Waiting..."

and I'll need to ctrl+z in order to get out from the waiting process.

*I'm using grunt-cli@0.1.9, bower@1.2.2, karma@0.10.1, mac OS X 10.8.4

@ToucheSir

@alwc Could it be that grunt-karma hasn't been updated in package.json? I just tried npm install on a fresh clone, and it installed grunt-karma 0.5.4. Try updating to 0.6.1 and see if that fixes anything....

@arsuceno

@ToucheSir add port option solution worked for me too using Karma v0.9.7 in Windows 7+Chrome. It solves my problem in #100 . Thanks!

@alwc
alwc commented Aug 24, 2013

@ToucheSir updated to 0.6.1 with a fresh clone, but nothing has changed...

@brianmriley

+1 for @ToucheSir solution.

@davidsiu

Thanks @ToucheSir ! Your solution of adding "port: 9877" worked for me!

@rtrusky
rtrusky commented Aug 27, 2013

+1 for @ToucheSir solution worked for me. Thanks!

@ToucheSir

@alwc tried with a fresh clone myself, and it worked without a hitch. Make sure you set the port to one greater than what's specified in your karma config. In the case of ng-boilerplate, that most likely ends up being 9877 or 9019.

@joshdmiller looking to add a PR for this. Should I PR against master or the ng1.2wip branch?

@lukehorvat

Thanks @ToucheSir. Specifying a karma.unit.port of 9019 in Gruntfile.js (9018 being defined in karma-unit.tpl.js) fixed it for me.

@scottybollinger

+1 for @ToucheSir. Thanks for posting!

@RichardLitt

@ToucheSir I tried setting it to 9019 and 9877, and both continued to hang on delta waiting.

At some point, I tried setting the port to 9077 while it was waiting, and saved Gruntfile.js. It then worked - for any port number I put in (I tried 9077, 9019, and 9877), as it would reload the watch config. I'm not sure why just setting it as 9019 or 9877 initially didn't work like those above. In the message below, [1] is where I saved Gruntfile.js with a different port number and caused it to reload.

Running "delta" task
Waiting...
[1] Reloading watch config...

Running "delta" task
Waiting...OK

Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.

Done, without errors.
Completed in 0.691s at Tue Sep 10 2013 08:19:32 GMT-0400 (EDT) - Waiting...
@joshdmiller
Member

@ToucheSir A PR would we awesome. You can do it against the master branch so I can push a fix out. I'll bump a patch version just for this. Thanks!

@tacticiankerala

+1 to @ryano144's comment. Removing karma:continuous from the list of tasks associated with the build worked for me as well.

grunt.registerTask( 'build', [
    'clean', 'html2js', 'jshint', 'coffeelint', 'coffee', 'recess:build',
    'concat:build_css', 'copy:build_app_assets', 'copy:build_vendor_assets',
    'copy:build_appjs', 'copy:build_vendorjs', 'index:build', 'karmaconfig'
  ]);
@narkisr
narkisr commented Sep 21, 2013

+1 to @ryano144's comment. Removing karma:continuous from the list of tasks associated with the build worked for me as well.

@ghost
ghost commented Oct 12, 2013

+1 for @ToucheSir solution worked for me. Thanks!

@Zerri
Zerri commented Oct 25, 2013

+1 for @ToucheSir solution worked for me. Thank You from Italy Guys!!

@rustyfausak

I simply cannot get this to work. I've read through all the suggested fixes and tried just about everything. Here's how I recreate the problem:

On Ubuntu 12.04:

$ git clone git://github.com/joshdmiller/ng-boilerplate ngb
$ cd ngb
$ sudo npm -g install grunt-cli karma bower
$ npm install
$ bower install

Everything works fine and installs properly up to this point. Now:

$ grunt watch
..
Running "karma:continuous" (karma) task
WARN [config]: config.configure() is deprecated, please use config.set() instead.
INFO [karma]: Karma v0.10.3 server started at http://localhost:9018/
INFO [launcher]: Starting browser Firefox
WARN [watcher]: Pattern "/var/www/projects/ngb/src/**/*.coffee" does not match any file.
WARN [launcher]: Firefox have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Firefox again.
WARN [launcher]: Firefox have not captured in 60000 ms, killing.
INFO [launcher]: Trying to start Firefox again.
WARN [launcher]: Firefox have not captured in 60000 ms, killing.
Warning: Task "karma:continuous" failed. Use --force to continue.

Aborted due to warnings.
$

When the INFO [launcher]: Starting browser Firefox line is outputted, a Firefox browser does indeed start and the URL bar loads http://localhost:9018/, but at the top of the page is displayed Karma - starting and it does not change.

One suggested fix in this thread is to add port: 9019 to Gruntfile.js in the karma configuration. This does not solve the problem with grunt watch.

Another suggested fix is to move karma:continuous from the build task to the default task. All this does is move the problem from where it was to:

Running "delta" task
Waiting...

I am at a complete loss. Does anyone have any suggestions or directions as to where I can go from here?

(I have also tried various other fixes from these issues and grunt-karma issues and none seem to work.)

ngboilerplate-grunt-karma-problem

@tacticiankerala

@rustyfausak , Since you have removed karma:continuous from build task you have resolved your first issue.

Resolve the issue 'Pattern "src/*/.coffee" does not match any file' by following instruction given below

  • Go to karma/karma-unit.tpl.js
  • comment out 'src/*/.coffee' under 'files' section
files: [
      <% scripts.forEach( function ( file ) { %>'<%= file %>',
      <% }); %>

      'src/**/*.js'

      // 'src/**/*.coffee',
    ],

Now the problem should be resolved.

@ToucheSir

@rustyfausak Make sure your grunt-karma version is >=0.6.2, or else grunt-karma will choke when you use it with karma 10.3.

@tacticiankerala Removing karma:continuous from the build should change nothing. The only reason this issue exists is because grunt-karma has no idea what port to run karma:unit (which is in the background) on. If you don't specify it specifically in the grunt-karma config, it will try to run on your karma:continuous port, and fail silently because the karma:continuous server has already stopped listening.

@tacticiankerala

@ToucheSir, Thank you so much for clarification. Let me try upgrading my grunt-karma. I have been using the hack until now.

@dylan-baskind

@ToucheSir's solution - fixed it for me!

@PaulL1
PaulL1 commented Nov 17, 2013

Duplicating the comment from the pull request above, for those dealing specifically with grunt watch issues:

OK, that last change is nothing to do with e2e testing, just a general fix to the gruntfile, reflecting issue 37. I was trying to work out what was going on, and my conclusion was:

  1. The task labelled karma:continuous was actually karma:runonce - because it explicitly ran once. I've changed the name to make that clear
  2. People were removing the old karma:continuous (now karma:runonce) from the build task. That fixed their problem with watch, but broke compile and build from doing anything sensible

To that end, I've refactored. I've created a "build_only" task, which is included in watch. This task doesn't include the old karma:continuous (now karma:runonce). I then changed build to call build_only, then karma:runonce, so the old build and compile behaviours remain without breaking watch.

This clearly would be much more useful as a feature commit. Unfortunately having messed up the 3.1 branch in my fork, I have no way to easily create that. So perhaps this is a 0.4 feature as well. Those who want this standalone could pick out these changes from the commit diff.

@tomyam1
tomyam1 commented Nov 24, 2013

@ToucheSir Thank you so much!

I really can't understand why this is not committed..

@otodockal

@ToucheSir You are hero! :) Thanks!

@tedyoung
tedyoung commented Jan 3, 2014

Is there any way to add the port: 9xxx to the karma configuration in the Gruntfile.js and make a 0.3.2 release? Like many others, I've spent hours trying to figure out what's going on, and this issue thread is so long that it took me a while to figure out what things to try. I know that may not fix it for everyone, but it seems to have fixed it enough for many people that it's worth doing a release.

@joshdmiller
Member

@tedyoung With a PR, I'd be happy to. :-)

@ToucheSir

@joshdmiller #153 has been hanging around since the beginning of this debacle. Would be great if you could merge it. :-)

@joshdmiller
Member

@ToucheSir Doh! My bad. That PR is already scheduled with a few other small things for a patch release next week, and v0.4 is only a week or two behind it. Thanks for setting me straight.

@porjo
porjo commented Feb 7, 2014

I've just hit this bug. Changing the port to 9019 fixed it for me (thanks to @ToucheSir). It'd be great to see #153 committed

@sheymann

+1

Is the project still under dev? Last commit is in Sept. 2013.

@tedyoung

Would appreciate a response as to whether this project is alive so that I can make a decision to stay with it or move to something else. Pull #153 still hasn't been merged and the patch release mentioned (0.12.1?) 2 months ago is still not released.

@nicktivity

+1 for @ToucheSir. Thanks for posting!

I am using ng-boilerplate 0.3.1

@Merott
Member
Merott commented Jan 10, 2015

Fixed.

@Merott Merott closed this Jan 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment