Skip to content

SPDY fails in node >= 11.1.0 #350

@bhevesi

Description

@bhevesi

Hi,

Couple of short investigation, why SPDY drop error message
//-------------------------------------------------------------------------------------------------------
buffer.js:72
class FastBuffer extends Uint8Array {}
^

RangeError: Invalid typed array length: -104
at new Uint8Array ()
at new FastBuffer (buffer.js:72:1)
at Handle.onStreamRead [as onread] (internal/stream_base_commons.js:121:17)
at Immediate. (/home/bhevesi/node_modules/handle-thing/lib/handle.js:128:16)
at processImmediate (timers.js:632:19)
//-------------------------------------------------------------------------------------------------------
using new version (11) of node.js.

I found that node internal/stream_base_commons.js has been changed in new version but the SPDY dependency ("handle-thing": "^1.2.5") is not properly call it in /lib/handles.js file.

In Node, function onStreamRead(arrayBuffer) called from handles.js via self.onread(uv.UV_EOF, new Buffer(0)) and self.onread(uv.UV_ECONNRESET, new Buffer(0)). So the given two parameters (instead of one) generates error.

In order to eliminate these errors, I had some changes in /lib/handles.js file:
Replaced "self.onread(uv.UV_EOF, new Buffer(0))" to self.onread(new Buffer(0)) and self.onread(uv.UV_ECONNRESET, new Buffer(0)) to self.onread(new Buffer(0))

Looks errors are disappears but more deep investigation required or/and live maintenance of "handle-thing": "^1.2.5" module

Best regards:
Bela

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions