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

Compatibility issue with new node.js #4

Closed
bhevesi opened this issue Nov 4, 2018 · 1 comment
Closed

Compatibility issue with new node.js #4

bhevesi opened this issue Nov 4, 2018 · 1 comment
Labels

Comments

@bhevesi
Copy link

bhevesi commented Nov 4, 2018

Hi,

Using SPDY and new version of node.js (11.1.0), I have got an 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)
//-------------------------------------------------------------------------------------------------------

Looks 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

Would be great to have compatibility with newest node.js. Thank You so much!

Best regards,
Bela

@daviddias
Copy link
Member

Now solved in version 3.0.0. Huge Hi5 to @jacobheun for fixing with #5 ❤️❤️❤️❤️❤️

@daviddias daviddias added the bug label Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants