I'm encountered a problem recently with PhantomJS library.
$ karma start
Log result:
Karma v0.13.15 server started at http://localhost:9876/ Starting browser PhantomJS INFO [PhantomJS 1.9.8 (Mac OS X 0.0.0)]: Connected on socket H1vRWOIqgBCUjb_bAAAA with id 36694801 PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR TYPE_MISMATCH_ERR: DOM Exception 17: The type of an object was incompatible with the expected type of the parameter associated to the object. at /Users/farman/.../tests.webpack.js:122637 <- webpack:///~/crypto-browserify/rng.js:14:0
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (2.21 secs / 0 secs)
Module versions:
- OSX: El Capitan 10.11.1
- node: 5.0.0
- Karma: 0.13.15
- karma-phantomjs-launcher: 0.2.1
- Phantomjs: 1.9.18
I've checked the forum, but still not solving the issue: https://github.com/AngularClass/angular2-webpack-starter/issues/45
crypto-browserify/rng.jspoints out the likely cause: "This will not work on older browsers" (which I assume includes PhantomJS- unless you polyfill it) - bvaughnMath.randominstead did indeed get rid of the issue for me in PhantomJS but that's not really a viable solution. - bvaughncrypto-browserify/rng.jsto use aUint8Arrayinstead of aBufferalso resolves the error (at least in my initial testing) - bvaughn