Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why Karma is showing Range error?

I'm writing testcases for angularjs in jasmine and using karma as a test runner. Before, Everything was running fine but suddenly this [RangeError: Wrong length!] occured. I don't even know how to debug it where it occured. Please Help..

> Executed 81 of 85 SUCCESS (0 secs / 1.835 secs) 28 12 2015
> 17:07:32.063:ERROR [karma]: [RangeError: Wrong length!] RangeError:
> Wrong length!
>     at RangeError (native)
>     at strictToLength (/home/knoldus/roobricks-datashape-ui/node_modules/core-js/modules/_typed-array.js:94:36)
>     at /home/knoldus/roobricks-datashape-ui/node_modules/core-js/modules/_typed-array.js:404:44
>     at new Uint8Array (/home/knoldus/roobricks-datashape-ui/node_modules/core-js/modules/es6.typed.uint8-array.js:3:12)
>     at allocate (buffer.js:98:17)
>     at new Buffer (buffer.js:49:12)
>     at BufferPool.reset (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/BufferPool.js:57:26)
>     at Receiver.endPacket (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/Receiver.js:247:68)
>     at Receiver.opcodes.1.finish (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/Receiver.js:483:12)
>     at Receiver.expectHandler (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/Receiver.js:451:33)
>     at Receiver.add (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/Receiver.js:95:24)
>     at Socket.realHandler (/home/knoldus/roobricks-datashape-ui/node_modules/ws/lib/WebSocket.js:800:20)
>     at emitOne (events.js:77:13)
>     at Socket.emit (events.js:169:7)
>     at readableAddChunk (_stream_readable.js:146:16)
>     at Socket.Readable.push (_stream_readable.js:110:10)
like image 774
Sumit Khanduri Avatar asked Dec 28 '15 11:12

Sumit Khanduri


1 Answers

It seems like this is a bug in the latest karma version (0.13.16). Check this issue: https://github.com/karma-runner/karma/issues/1768.

If you have updated to [email protected] and the coverage reporter is enabled, you will run into this problem.

Right now the issue is not solved, so you can either downgrade to [email protected] or disable the coverage reporter. When the problem is fixed, a new patch version is probably going to be released.

like image 59
brunopicinin Avatar answered Oct 04 '22 15:10

brunopicinin