question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[karma]: TypeError: Cannot read property 'unmask' of undefined

See original GitHub issue

Hello! I just started new project with vue-webpack template and get this error when start Karma.

My configuration is OS: linux nodejs 7.10.0

Thanks!

terminal-client@1.0.0 test:watch /home/alexey2baranov/htdocs/terminal-client cross-env BABEL_ENV=test karma start test/unit/karma.conf.js

26 05 2017 11:20:27.635:WARN [karma]: No captured browser, open http://localhost:9876/ 26 05 2017 11:20:27.813:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9876/ 26 05 2017 11:20:27.816:INFO [launcher]: Launching browser Chrome with unlimited concurrency 26 05 2017 11:20:31.222:INFO [launcher]: Starting browser Chrome 26 05 2017 11:20:36.924:INFO [Chrome 57.0.2987 (Linux 0.0.0)]: Connected on socket CPDfri4jMAa3b6CEAAAA with id 12770951 26 05 2017 11:20:36.933:ERROR [karma]: TypeError: Cannot read property ‘unmask’ of undefined at Receiver.unmask (/home/alexey2baranov/htdocs/terminal-client/node_modules/engine.io/node_modules/ws/lib/Receiver.js:306:46) at Receiver.finish (/home/alexey2baranov/htdocs/terminal-client/node_modules/engine.io/node_modules/ws/lib/Receiver.js:505:25) at Receiver.expectHandler (/home/alexey2baranov/htdocs/terminal-client/node_modules/engine.io/node_modules/ws/lib/Receiver.js:493:33) at Receiver.add (/home/alexey2baranov/htdocs/terminal-client/node_modules/engine.io/node_modules/ws/lib/Receiver.js:103:24) at Socket.realHandler (/home/alexey2baranov/htdocs/terminal-client/node_modules/engine.io/node_modules/ws/lib/WebSocket.js:825:20) at emitOne (events.js:96:13) at Socket.emit (events.js:191:7) at readableAddChunk (_stream_readable.js:178:18) at Socket.Readable.push (_stream_readable.js:136:10) at TCP.onread (net.js:561:20)

package.json

{
  "name": "terminal-client",
  "version": "1.0.0",
  "description": "terminal clietn",
  "author": "alexey2baranov@gmail.com",
  "private": true,
  "scripts": {
    "crossbar": "crossbar start",
    "dev": "node build/dev-server.js",
    "build": "node build/build.js",
    "unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
    "test": "npm run unit",
    "test:watch": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js"
  },
  "dependencies": {
    "autobahn": "^17.5.2",
    "bootstrap": "^3.3.7",
    "event-emitter": "^0.3.5",
    "jquery": "^3.2.1",
    "loglevel": "^1.4.1",
    "tether": "^1.4.0",
    "vue": "^2.2.2"
  },
  "devDependencies": {
    "autoprefixer": "^6.7.2",
    "babel-core": "^6.22.1",
    "babel-loader": "^6.2.10",
    "babel-plugin-istanbul": "^3.1.2",
    "babel-plugin-transform-runtime": "^6.22.0",
    "babel-preset-env": "^1.2.1",
    "babel-preset-stage-2": "^6.22.0",
    "babel-register": "^6.22.0",
    "chai": "^3.5.0",
    "chalk": "^1.1.3",
    "connect-history-api-fallback": "^1.3.0",
    "copy-webpack-plugin": "^4.0.1",
    "cross-env": "^3.2.4",
    "css-loader": "^0.26.1",
    "eventsource-polyfill": "^0.9.6",
    "express": "^4.14.1",
    "extract-text-webpack-plugin": "^2.0.0",
    "file-loader": "^0.10.0",
    "friendly-errors-webpack-plugin": "^1.1.3",
    "function-bind": "^1.1.0",
    "html-webpack-plugin": "^2.28.0",
    "http-proxy-middleware": "^0.17.3",
    "inject-loader": "^2.0.1",
    "karma": "^1.4.1",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage": "^1.1.1",
    "karma-mocha": "^1.3.0",
    "karma-phantomjs-launcher": "^1.0.2",
    "karma-sinon-chai": "^1.2.4",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-spec-reporter": "0.0.26",
    "karma-webpack": "^2.0.2",
    "lolex": "^1.5.2",
    "mocha": "^3.2.0",
    "opn": "^4.0.2",
    "optimize-css-assets-webpack-plugin": "^1.3.0",
    "ora": "^1.1.0",
    "phantomjs-prebuilt": "^2.1.14",
    "rimraf": "^2.6.0",
    "semver": "^5.3.0",
    "sinon": "^1.17.7",
    "sinon-chai": "^2.8.0",
    "url-loader": "^0.5.7",
    "vue-loader": "^11.1.4",
    "vue-style-loader": "^2.0.0",
    "vue-template-compiler": "^2.2.4",
    "webpack": "^2.2.1",
    "webpack-bundle-analyzer": "^2.2.1",
    "webpack-dev-middleware": "^1.10.0",
    "webpack-hot-middleware": "^2.16.1",
    "webpack-merge": "^2.6.1"
  },
  "engines": {
    "node": ">= 4.0.0",
    "npm": ">= 3.0.0"
  },
  "browserslist": [
    "> 1%",
    "last 2 versions",
    "not ie <= 8"
  ]
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
adrlencommented, Jul 6, 2017

If you remove autobahn from your project, npm run test won’t fail anymore.

0reactions
LinusBorgcommented, Sep 2, 2017

seems resolved in karma.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'unmask' of undefined at ...
Launch karma in chrome browser and abru[tly ...
Read more >
[karma]: TypeError: Cannot read property 'unmask' of undefined
Hello! I just started new project with vue-webpack template and get this error when start Karma. My configuration is. OS: linux
Read more >
karma-runner/karma - Gitter
TypeError : Cannot read property 'slice' of undefined. Pete Miller ... [karma]: TypeError: Cannot read property 'unmask' of undefined at Receiver.unmask ...
Read more >
cannot read property of undefined karma test - You.com
This bug report is from using Angular2 and Karma/Jasmine But the error is emitted from Typescript. I am hoping that is the relevant...
Read more >
ERROR [karma] - Cannot read property 'unmask' of undefined
ERROR [karma]: TypeError: Cannot read property 'unmask' of undefined · 推荐阅读更多精彩内容 · 热门故事.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found