molnarg / node-http2

An HTTP/2 client and server implementation for node.js
MIT License
1.79k stars 187 forks source link

TypeError failure with Node 6.3.1 #214

Closed akc42 closed 7 years ago

akc42 commented 7 years ago

I don't know if this is a result of installing 6.3.1 of node, but I have just moved my working code to a new server.

2016-07-24 23:40: TypeError: "value" argument is out of bounds
    at checkInt (buffer.js:1028:11)
    at Buffer.writeUInt16BE (buffer.js:1097:5)
    at Function.writeCommonHeader [as commonHeader] (/home/pas/pasv5/server/node_modules/http2/lib/protocol/framer.js:214:16)
    at Serializer._transform (/home/pas/pasv5/server/node_modules/http2/lib/protocol/framer.js:44:27)
    at Serializer.Transform._read (_stream_transform.js:167:10)
    at Serializer.Transform._write (_stream_transform.js:155:12)
    at doWrite (_stream_writable.js:307:12)
    at writeOrBuffer (_stream_writable.js:293:5)
    at Serializer.Writable.write (_stream_writable.js:220:11)
    at Compressor.ondata (_stream_readable.js:556:20)

The exact same code is working on my development server (intel based), but I just moved to a raspberry pi (armv7) and immediately get this error whilst making the first request. The only difference is the node version I am using and by implication the node module versions that are loaded. My development server is using node 6.2.0

akc42 commented 7 years ago

This is very similar to #207, except I am not getting the Assertion Error. As it appears to fail before that.

akc42 commented 7 years ago

I have just reverted the node version on this armv7 raspberry pi to 6.2.0, and without any other changes my application is working again, and I do not get the above error. I have therefore changed the title of this issue to reflect that.

nwgh commented 7 years ago

Sounds like v3.3.5 is going to be the node 6.3.0+ compat release...

bjb568 commented 7 years ago

I repro both this and #207 on node 6.4.0.

nwgh commented 7 years ago

Looking at the code here, I'm fairly certain this is the same root cause as #207, just a different symptom (based on the size of the frame). I'm going to mark this as fixed. Please re-open if it is not fixed in v3.3.5 (to be published on npm within an hour or so).