spdy-http2 / node-spdy

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

Cannot read property 'chunk' of null #388

Open dannybloe opened 2 years ago

dannybloe commented 2 years ago

Hi folks,

I'm using spdy 4.0.2 for a while now with node 14.17.5 (on MacOs) and all seems to be working just fine except that whenever something in the network changes (mostly when my vpn connection stops or reconnects) I get this trace:

TypeError: Cannot read property 'chunk' of null
    at Socket.bytesWritten (net.js:819:17)
    at Socket.socketOnError (_http_server.js:642:31)
    at Socket.emit (events.js:400:28)
    at Socket.emit (domain.js:470:12)
    at Stream.onStreamError (/Users/xproject/2021.4/node_modules/spdy/lib/spdy/handle.js:110:18)
    at Stream.emit (events.js:400:28)
    at Stream.emit (domain.js:470:12)
    at errorOrDestroy (/Users/x/project/2021.4/node_modules/spdy-transport/node_modules/readable-stream/lib/internal/streams/destroy.js:98:101)
    at onwriteError (/Users/x/project/2021.4/node_modules/spdy-transport/node_modules/readable-stream/lib/_stream_writable.js:424:5)
    at onwrite (/Users/x/project/2021.4/node_modules/spdy-transport/node_modules/readable-stream/lib/_stream_writable.js:450:11)
error Command failed with exit code 1.

We use spdy in combination with webpack to create a proxy. Statics files are served by webpack dev server and api calls are sent to a remote server. We didn't get this when we were still using express.

Any suggestions to help fix this are welcome.

Cheers, Danny