Skip to content
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

Missing error handler on socket #2042

Open
georgeedwards opened this issue Apr 5, 2016 · 15 comments
Open

Missing error handler on socket #2042

georgeedwards opened this issue Apr 5, 2016 · 15 comments

Comments

@georgeedwards
Copy link

Expected behavior

My Travis CI build to complete the Jasmine Unit tests defined, reporting the number run and success vs. failure.

Actual behavior

This is the output from my build log. Here is the full build log. Also, here is the full github repository that was being built.

[09:39:04] Starting 'client.unit_test'...
05 04 2016 09:39:04.281:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
05 04 2016 09:39:04.287:INFO [launcher]: Starting browser Chrome
05 04 2016 09:39:05.519:INFO [Chrome 49.0.2623 (Linux 0.0.0)]: Connected on socket /#7wcOJ3uFvZX-HgZeAAAA with id 49035067
Missing error handler on `socket`.
TypeError: (msg || "").replace is not a function
  at /home/travis/build/georgeedwards/Gen-App/node_modules/karma/lib/reporter.js:45:23
  at [object Object].onBrowserError (/home/travis/build/georgeedwards/Gen-App/node_modules/karma/lib/reporters/base.js:58:60)

Enviroment Details

  • Karma version (output of karma --version):
  • Relevant part of your karma.config.js file

Not sure which bits of the config file are relevant, here is the whole thing.

Steps to reproduce the behaviour

  1. Clone my Repo (link above)
  2. Build it on Travis, or presumably any other ubuntu build server
    3.
@Florian-R
Copy link

#1969 #1988 and probably a few others

@georgeedwards
Copy link
Author

@Florian-R Thanks for that. I am afraid I have already looked over these and a number of other issues.

I believe this was a bug which surfaced and was then fixed in release 0.13.19, so I don't believe those issues apply. #1751

I don't believe (?) there are any issues with my files declaration - certainly not my rx.js file. Sorry #1969

I also haven't been able to get this to work in any configuration (no folder move), so I am not sure #1988 applies.

@sharikovvladislav
Copy link

I have similar problem with TeamCity: #1751 (comment) . Same karma version. I use karma-teamcity-reporter reporter.

@georgeedwards
Copy link
Author

@sharikovvladislav Thanks for pointing out, you don't seem to be getting the:

TypeError: (msg || "").replace is not a function

line? Have you found a resolution to your issue?

@georgeedwards
Copy link
Author

Would be grateful for any guidance as this is a bit of a show stopper for my testing at the moment ...

@meriturva
Copy link

The same here!
I have same problems when running tests from Visual Studio/Gulp with reporters: ['progress'], browsers: ['Chrome'] and TeamCity with reporters: ['teamcity', 'coverage'], browsers: ['PhantomJS']

@phhoangbao
Copy link

phhoangbao commented Apr 23, 2016

@georgeedwards you can try to change line 14 of file: karma-test-shim.js from format: 'register' --> format: 'cjs', your tsconfig.js using commonjs.

I created simple application to simulate the error and fix.
https://github.com/phhoangbao/angular2-test

aaronheath added a commit to aaronheath/afl-2016 that referenced this issue Apr 28, 2016
@Dillonmcewan
Copy link

I'm also running into this issue. Has anyone found a solution?

@meriturva
Copy link

@Dillonmcewan hi...it is just an error on angular test configuration not karma related....i fixed using configuration from: https://github.com/antonybudianto/angular2-starter

enzor added a commit to Alfresco/alfresco-ng2-components that referenced this issue Jun 3, 2016
@vaudy
Copy link

vaudy commented Jun 15, 2016

I had the same issue but I was missing a dependency in my package json.

WARN [web-server]: �[39m404: /base/dist/vendor/lodash/lodash.min.js
[INFO] Missing error handler on socket.
[INFO] TypeError: (msg || "").replace is not a function

@vaudy
Copy link

vaudy commented Jun 15, 2016

have u try to load {pattern: 'karma-test-shim.js', included: true, watched: true} at the end before "tests/*_/__test.js" ?

@Dillonmcewan
Copy link

Dillonmcewan commented Jun 15, 2016

Was able to solve this. It happened several times and it always seemed to be a missing dependency in the files I was loading in my karma.conf.js. If the error message logged the file that was missing it would be much easier to track down the problem

@joaopgrassi
Copy link

I'm having the same issue. If I use reporters: ['progress'] everything works, but as soon as I add teamcity it gives the exact same error as @georgeedwards described. We've updated our app to Angular2 2.0.1 and since them this issue showed up.
I don't think it is a configuration problem, otherwise with progress reporter it would also fail, I guess. @meriturva as I could see, you are also using teamcity. How did you ended up fixing it?

@sharikovvladislav
Copy link

Any news on this issue?

@johnjbarton
Copy link
Contributor

I would say the evidence here points to team-city or config problems.

Please post your full error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants