Skip to content

Missing error handler on socket. TypeError: (msg || "").replace is not a function Error #1969

@whelanp

Description

@whelanp

I'm getting the above error when I try to run jenkins jobs using karma. Any ideas what could be causing this?

Expected behavior

karma runs angular2 tests on jenkins, they run fine on desktop.

Actual behavior

`Missing error handler on `socket`.
TypeError: (msg || "").replace is not a function
    at /home/hudson/.hudson/jobs/workspace/example/node_modules/karma/lib/reporter.js:45:23
    at onBrowserError (/home/hudson/.hudson/jobs/workspace/example/node_modules/karma/lib/reporters/base.js:58:60)
    at null.<anonymous> (/home/hudson/.hudson/jobs/workspace/example/node_modules/karma/lib/events.js:13:22)
    at emitTwo (events.js:100:13)
    at emit (events.js:185:7)
    at onKarmaError (/home/hudson/.hudson/jobs/workspace/example/node_modules/karma/lib/browser.js:95:13)
    at Socket.<anonymous> (/home/hudson/.hudson/jobs/workspace/example/node_modules/karma/lib/events.js:13:22)
    at emitOne (events.js:95:20)
    at Socket.emit (events.js:182:7)
    at Socket.onevent (/home/hudson/.hudson/jobs/workspace/example/node_modules/socket.io/lib/socket.js:335:8)
    at Socket.onpacket (/home/hudson/.hudson/jobs/workspace/example/node_modules/socket.io/lib/socket.js:295:12)
    at Client.ondecoded (/home/hudson/.hudson/jobs/workspace/example/node_modules/socket.io/lib/client.js:193:14)
    at Decoder.Emitter.emit (/home/hudson/.hudson/jobs/workspace/example/node_modules/component-emitter/index.js:134:20)
    at Decoder.add (/home/hudson/.hudson/jobs/workspace/example/node_modules/socket.io-parser/index.js:247:12)
    at Client.ondata (/home/hudson/.hudson/jobs/workspace/example/node_modules/socket.io/lib/client.js:175:18)
    at emitOne (events.js:90:13)`

Enviroment Details

  • Karma version (output of karma --version):
  • Relevant part of your karma.config.js file
  • node --version
    v5.7.0
  • npm --version
    3.6.0
    karma version
    0.13.21

Steps to reproduce the behaviour

  1. run tests in jenkins, (independent of the tests running) the above stacktrace is displayed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions