-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot call method 'getText' of undefined #28
Comments
I've added the ability in the latest RTD to disable just unit test coverage in rtd.conf.js, which seems to be the cause. I suspect it's the way karma is generating the coverage reports somehow. |
yes i've seen it but i need coverage reports :) |
fair enough! I've resorted to just the acceptance tests as that's better suited for us, however that doesn't mean the unit coverage combination shouldn't be fixed. For your info, you can still get the unit coverage from /build/reports/... but the combination of those with the server/client coverage from acceptance tests is the part that's broken. I need to dig in to why karma is doing this, but I've got to finish a few other things first with the actual app we're building. |
Let's reverse starting from the error : In final.spec.js, verifyCoverageThresholds function send the TypeError message because "metrics" is empty at this line driver.findElements(webdriver.By.className('metric')).then(function (metrics) { ... } Because the web page ( localhost:8000/coverage ) is 404 Not Found At openCoveragePage -> driver.get('http://localhost:8000/coverage'); - -> why is this server down ? modify in Gruntfile.js to have more information : jasmine-node --captureExceptions --verbose => no effect :( |
Thanks for looking further. The problem I saw was this: If you hit localhost/coverage before the coverage is posted from the unit tests, it works. But if you post a coverage file from that reports directory, it kills the server. My suspicion is something has happened to the way Karma generates those files to begin with. Perhaps some library that Karma depends on has been updated. |
which version of karma is installed ? imac-de-laurent:rtd laurent$ npm ls -g karma npm WARN package.json dateformat@1.0.2-1.2.3 No repository field. npm WARN package.json istanbul@0.1.22 No repository field. npm WARN package.json pause@0.0.1 No repository field. npm WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported. npm WARN package.json Please pick one as the 'repository' field npm WARN package.json cli-table@0.2.0 No repository field. npm WARN package.json github-url-from-git@1.1.1 No repository field. npm WARN package.json eyes@0.1.8 No repository field. npm WARN package.json cheerio-select@0.0.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. /usr/local/lib └── karma@0.8.5 Having a try with 0.8.6 karma@0.8.6 /usr/local/lib/node_modules/karma ├── pause@0.0.1 ├── dateformat@1.0.2-1.2.3 ├── xmlbuilder@0.4.2 ├── colors@0.6.0-1 ├── chokidar@0.6.2 ├── growly@1.1.1 ├── mime@1.2.9 ├── q@0.9.6 ├── coffee-script@1.6.3 ├── lodash@1.1.1 ├── rimraf@2.1.4 (graceful-fs@1.2.2) ├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0) ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.2) ├── optimist@0.3.5 (wordwrap@0.0.2) ├── LiveScript@1.0.1 (prelude-ls@1.0.0) ├── log4js@0.6.6 (dequeue@1.0.3, semver@1.1.4, async@0.1.15, readable-stream@1.0.2) ├── http-proxy@0.10.3 (pkginfo@0.2.3, utile@0.1.7) ├── istanbul@0.1.22 (abbrev@1.0.4, which@1.0.5, fileset@0.1.5, nopt@2.0.0, wordwrap@0.0.2, async@0.1.22, mkdirp@0.3.5, esprima@0.9.9, escodegen@0.0.23, handlebars@1.0.12) └── socket.io@0.9.16 (policyfile@0.0.4, base64id@0.1.0, redis@0.7.3, socket.io-client@0.9.16) No improvment, back to 0.8.5 karma@0.8.5 /usr/local/lib/node_modules/karma ├── pause@0.0.1 ├── dateformat@1.0.2-1.2.3 ├── xmlbuilder@0.4.2 ├── colors@0.6.0-1 ├── chokidar@0.6.2 ├── growly@1.1.1 ├── mime@1.2.9 ├── q@0.9.6 ├── coffee-script@1.6.3 ├── lodash@1.1.1 ├── rimraf@2.1.4 (graceful-fs@1.2.2) ├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.0) ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.2) ├── optimist@0.3.5 (wordwrap@0.0.2) ├── LiveScript@1.0.1 (prelude-ls@1.0.0) ├── log4js@0.6.6 (dequeue@1.0.3, semver@1.1.4, async@0.1.15, readable-stream@1.0.2) ├── http-proxy@0.10.3 (pkginfo@0.2.3, utile@0.1.7) ├── istanbul@0.1.22 (abbrev@1.0.4, which@1.0.5, fileset@0.1.5, nopt@2.0.0, wordwrap@0.0.2, async@0.1.22, mkdirp@0.3.5, esprima@0.9.9, escodegen@0.0.23, handlebars@1.0.12) └── socket.io@0.9.16 (base64id@0.1.0, policyfile@0.0.4, redis@0.7.3, socket.io-client@0.9.16) Same dependencies between 0.8.5 and 0.8.6. |
Baffling! I'll take a another poke around later on... |
Hi, did you get any further with this? |
No, i'm waiting for karma-runner/karma#635 to be solved. |
No more error with last fresh reinstall -> closing |
Great to hear |
I forgot to change rtd.conf.js coverage enable to true, the error is still here :( |
npm ls -g /usr/local/lib ├─┬ bower@0.10.0 ├─┬ grunt-cli@0.1.9 ├─┬ istanbul@0.1.43 ├─┬ jasmine-node@1.11.0 ├─┬ karma@0.8.8 ├─┬ meteorite@0.5.1 ├── n@1.0.0 ├─┬ npm@1.2.32 ├─┬ phantomjs@1.9.1-0 ├── selenium-webdriver@2.33.0 |
Hi, I have the same issue. I've disabled coverage reporting for now. |
Thanks for the reports, I'll work on this again soon, a little swamped for the next week or so |
this seems to be working now with the latest karma. Could you guys kindly check out the latest and let me know? |
As mentionned in #27, there was also this error raising where coverage is enabled :
I forked the rtd project for another use (parse.com javascript SDK Cloud Code, Backbone based) but this error just came back to surface ... digging ...
The text was updated successfully, but these errors were encountered: