Does not work with Chrome but Firefox
Closed this issue · 10 comments
I did a fresh install (https://gist.github.com/lc3t35/5965856) for this issue (twolfson/grunt-zip#14)
When i configure karma.conf.js with Chrome, Chrome opens with a cannot open status message -> it cannot open any url (localhost:3000, 8000, 4444) from Chrome but if i can open them all with Firefox (so they're running : 9876, 3000, 8000, 4444) !
Arglll !
Do you mean the combining of coverage reports works when you swap out Phantom with Firefox or are you having trouble with getting Karma to use Chrome?
trouble with getting Karma to use Chrome
Nothing works with Karma and Chrome (but it worked previously !) and before coverage report :(
Chrome launches and displays : http://localhost:9876/?id=19345345 cannot access to the page, it tries again later, if you refresh nothing... but if you open FF at this URL -> Karma connected !
Here the ./rtd --debug output
imac-de-laurent:rtd laurent$ ./rtd --debug npm WARN package.json growl@1.7.0 No repository field. npm WARN package.json dateformat@1.0.2-1.2.3 No repository field. npm WARN package.json assert-plus@0.1.2 No repository field. npm WARN package.json ctype@0.5.2 No repository field. >>> filepath : /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/Gruntfile.js >>> filepath : /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee >>> filepath : /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-contrib-watch/tasks/watch.js >>> filepath : /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-zip/tasks/zip.js Running "bgShell:killAll" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee Running "downloadAndOrStartSelenium" task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/Gruntfile.js Running "bgShell:synchronizeMirrorApp" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee Running "bgShell:instrumentCode" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee . Processed [3] files in 0 secs Running "bgShell:startMirrorApp" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee Running "bgShell:startKarma" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee Running "bgShell:startApp" (bgShell) task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-bg-shell/tasks/bg-shell.coffee Running "outputPorts" task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/Gruntfile.js Launching Selenium-server on port 4444 Launching Karma listener on port 9876 Launching Karma runner on port 9100 Launching Meteor on port 3000 Launching Mirror on port 8000 Running "watch" task [D] Task source: /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/node_modules/grunt-contrib-watch/tasks/watch.js Waiting...DEBUG [reporter]: Using reporter "dots". DEBUG [reporter]: Using reporter "coverage". INFO [karma]: Karma server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome DEBUG [launcher]: Creating temp dir at /var/folders/mg/27j371qn68943s9ych8g50jm0000gp/T/testacular-19345345 DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/mg/27j371qn68943s9ych8g50jm0000gp/T/testacular-19345345 --no-default-browser-check --no-first-run --disable-default-apps --start-maximized http://localhost:9876/?id=19345345 WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/*-stubs.coffee" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/lib/**/*.js" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/lib/**/*.coffee" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/client/lib/**/*.js" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/client/lib/**/*.coffee" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/server/lib/**/*.js" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/server/lib/**/*.coffee" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/models/**/*.coffee" does not match any file. WARN [watcher]: Pattern "/Users/laurent/dev/meteor/real-time-development-with-meteor/test/unit/**/*.coffee" does not match any file. DEBUG [preprocess.coverage]: Processing "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/models/Players.js". DEBUG [preprocess.coverage]: Processing "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/client/leaderboard.js". DEBUG [preprocess.coverage]: Processing "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/models/Players.js". DEBUG [preprocess.coverage]: Processing "/Users/laurent/dev/meteor/real-time-development-with-meteor/app/server/leaderboard.js". DEBUG [watcher]: Resolved files: /usr/local/lib/node_modules/karma/adapter/lib/jasmine.js /usr/local/lib/node_modules/karma/adapter/jasmine.js /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/jquery-stubs.js /Users/laurent/dev/meteor/real-time-development-with-meteor/test/rtd/lib/meteor-stubs.js /Users/laurent/dev/meteor/real-time-development-with-meteor/test/unit/client/leaderboard.js /Users/laurent/dev/meteor/real-time-development-with-meteor/test/unit/models/Players.js /Users/laurent/dev/meteor/real-time-development-with-meteor/test/unit/server/leaderboard.js /Users/laurent/dev/meteor/real-time-development-with-meteor/app/models/Players.js /Users/laurent/dev/meteor/real-time-development-with-meteor/app/client/leaderboard.js /Users/laurent/dev/meteor/real-time-development-with-meteor/app/server/leaderboard.js [[[[[ ~/dev/meteor/real-time-development-with-meteor/app ]]]]] [[[[[ ~/dev/meteor/real-time-development-with-meteor/build/mirror_app ]]]]] => Meteor server running on: http://localhost:3000/ => Meteor 0.6.4 is available. Update this project with 'meteor update'. => Meteor 0.6.4 is available. Update this project with 'meteor update'. => Meteor server running on: http://localhost:8000/ WARN [launcher]: Chrome have not captured in 60000 ms, killing. DEBUG [launcher]: Process Chrome exitted with code 0 DEBUG [launcher]: Cleaning temp dir /var/folders/mg/27j371qn68943s9ych8g50jm0000gp/T/testacular-19345345 INFO [launcher]: Trying to start Chrome again. DEBUG [launcher]: Creating temp dir at /var/folders/mg/27j371qn68943s9ych8g50jm0000gp/T/testacular-19345345 DEBUG [launcher]: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --user-data-dir=/var/folders/mg/27j371qn68943s9ych8g50jm0000gp/T/testacular-19345345 --no-default-browser-check --no-first-run --disable-default-apps --start-maximized http://localhost:9876/?id=19345345 DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/client.html DEBUG [web server]: serving: /usr/local/lib/node_modules/karma/static/testacular.js DEBUG [karma]: New browser has connected on socket KBkcY_KLp1DAkuqseIxB INFO [Firefox 22.0 (Mac)]: Connected on socket id KBkcY_KLp1DAkuqseIxB
And of course if you modify a file, as there is no browser ...
- - - Running unit tests - - - DEBUG [karma]: Execution (fired by runner) WARN [karma]: No captured browser, open http://localhost:9876/ No captured browser, open http://localhost:9876/ >> Error: Command failed: Fatal error: Command failed:
Chrome version : Version 28.0.1500.71
I suggest to try to setup a barebones karma project and see if that works
i've installed karma source and run the test :
imac-de-laurent:karma laurent$ grunt test Running "test:unit" (test) task Running "simplemocha:unit" (simplemocha) task 245 tests complete (3 seconds) Running "test:tasks" (test) task Running "simplemocha:tasks" (simplemocha) task 12 tests complete (6 ms) Running "test:client" (test) task Running /Users/laurent/dev/karma/bin/karma start test/client/karma.conf.js --single-run --no-auto-watch --reporters=dots --browsers=Chrome INFO [karma]: Karma v0.9.4 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome WARN [launcher]: Chrome have not captured in 5000 ms, killing. INFO [launcher]: Trying to start Chrome again. WARN [launcher]: Chrome have not captured in 5000 ms, killing. INFO [launcher]: Trying to start Chrome again. WARN [launcher]: Chrome have not captured in 5000 ms, killing. [Error] Fatal error: Client unit tests failed.
I would say this one is for the karma support people :)
Submitted ;)
great, I'll close this here
/etc/hosts file was corrupted -> this prevents Chrome to access localhost . Other browsers don't care of this file but Chrome does !
Issue #635 is closed.
i did a fresh install -> works fine with phantomJS and Chrome on MacOS X.
Thanks for the update