spdy-http2 / node-spdy

SPDY server on Node.js
2.81k stars 196 forks source link

Crash: The value "0" is invalid for option "windowBits" #334

Closed tschoffelen closed 4 years ago

tschoffelen commented 6 years ago

Full stack:

RangeError [ERR_INVALID_OPT_VALUE]: The value "0" is invalid for option "windowBits"
    at Inflate.Zlib (zlib.js:213:15)
    at new Inflate (zlib.js:619:8)
    at Object.value [as createInflate] (zlib.js:680:14)
    at createInflate (/var/service/node_modules/spdy-transport/lib/spdy-transport/protocol/spdy/zlib-pool.js:25:22)
    at Pool.get (/var/service/node_modules/spdy-transport/lib/spdy-transport/protocol/spdy/zlib-pool.js:59:19)
    at Connection._onVersion (/var/service/node_modules/spdy-transport/lib/spdy-transport/connection.js:222:23)
    at Parser.<anonymous> (/var/service/node_modules/spdy-transport/lib/spdy-transport/connection.js:161:10)
    at Object.onceWrapper (events.js:255:19)
    at Parser.emit (events.js:160:13)
    at Parser.setVersion (/var/service/node_modules/spdy-transport/lib/spdy-transport/protocol/base/parser.js:98:8)
    at Connection.start (/var/service/node_modules/spdy-transport/lib/spdy-transport/connection.js:489:26)
    at Server._handleConnection (/var/service/node_modules/spdy/lib/spdy/server.js:118:16)
    at Server._onConnection (/var/service/node_modules/spdy/lib/spdy/server.js:88:8)
    at Server.emit (events.js:160:13)
    at Server.emit (/var/service/node_modules/spdy/lib/spdy/server.js:218:40)
    at TLSSocket.onSocketSecure (_tls_wrap.js:731:29)

Any idea how to resolve this?

anandsuresh commented 6 years ago

Hey @tschoffelen Did you get this fixed? If not, can you please provide version/platform details?

tschoffelen commented 6 years ago

This is still happening, I'm currently just catching that error, but I think it leads to some requests receiving an empty response.

OS: Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-135-generic x86_64)
Node: v9.5.0
anandsuresh commented 6 years ago

There is a more permanent fix for this issue in node core: https://github.com/nodejs/node/pull/19686. Should land soon. In the mean time can you please try using this branch: https://github.com/anandsuresh/node-spdy/tree/voxer.

tschoffelen commented 6 years ago

Ah, thanks for the info! Feel free to close this issue then!