Seeing this error http://localhost:4000/__webpack_hmr net::ERR_INCOMPLETE_CHUNKED_ENCODING in browser console after upgrading to node v8. As a result, code injection fails for certain updates.
UPDATE:
Here's what I've tried and known to work
reference: https://github.com/egoist/poi/issues/179
Here's a minimal repro:
https://gist.github.com/egoist/55fed736c70eeb74a238a738f9f5ed13
From what I can tell, node is killing the request due to a timeout.
Edit: I think it might be this: https://github.com/nodejs/node/pull/2534. So there is now a 5s keep-alive timeout that can be set via keepAliveTimeout.
It looks like keepAliveTimeout needs to be set on the server before any requests - as I understand Express middleware works on requests.
const server = app.listen(4000, () => {
server.keepAliveTimeout = 0;
});
Using a heartbeat of 5s or less also works.
Is there anything we can do per-request?
Requiring server changes for a middleware is a bit annoying.
Maybe we should just make the default heartbeat 4 seconds instead?
Yeah, perhaps a lower default and a print a warning if the heartbeat is lower than keepAliveTimeout?
I just started encountering the same issue after upgrading to Node 8.
@brudil thanks for the fix, setting the server's keepAliveTimeout to 0 resolved the issue for me.
Seems to work fine on node 8.1.1
I can confirm it's working with node 8.1.1 as well
Also confirmed! 馃拑
Just gotta update to 8.1.1 and it's golden.
Anyone know what changed in core to fix this for us?
Anyone know what changed in core to fix this for us?
@glenjamin it's both https://github.com/nodejs/node/issues/13435 + https://github.com/nodejs/node/issues/13391 and the one @brudil pointed out in his reply its https://github.com/nodejs/node/pull/2534. They're all pointing to the same issue.
Cheers for the link, read through those and it looks like https://github.com/nodejs/node/pull/13549 was the fix.
Gonna call this issue closed
upgrade node to latest version(9.0.0):
node -v
sudo npm cache clean -f
sudo n stable
node -v
also fixed for me.
The problem has been solved. thx
Most helpful comment
From what I can tell, node is killing the request due to a timeout.
Edit: I think it might be this: https://github.com/nodejs/node/pull/2534. So there is now a 5s keep-alive timeout that can be set via
keepAliveTimeout.It looks like keepAliveTimeout needs to be set on the server before any requests - as I understand Express middleware works on requests.
Using a heartbeat of 5s or less also works.