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

net::ERR_INCOMPLETE_CHUNKED_ENCODING in node v8.0 + chrome 58.0.3029.110 #210

Closed
Rayraegah opened this issue Jun 1, 2017 · 13 comments
Closed

Comments

@Rayraegah
Copy link

Rayraegah commented Jun 1, 2017

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

  • About 15 seconds after launching application, this error pops up in the console
  • About 30 ~ 45 seconds later, hmr works again
  • And then, it randomly breaks. Haven't been able to determine the criteria upon which it fails
  • hmr was stable in node v7

reference: egoist/poi#179

@egoist
Copy link

egoist commented Jun 1, 2017

Here's a minimal repro:

https://gist.github.com/egoist/55fed736c70eeb74a238a738f9f5ed13

@brudil
Copy link

brudil commented Jun 1, 2017

From what I can tell, node is killing the request due to a timeout.

Edit: I think it might be this: nodejs/node#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.

@glenjamin
Copy link
Collaborator

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?

@brudil
Copy link

brudil commented Jun 2, 2017

Yeah, perhaps a lower default and a print a warning if the heartbeat is lower than keepAliveTimeout?

@jharris4
Copy link

jharris4 commented Jun 4, 2017

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.

yyx990803 pushed a commit to vuejs/vue-hackernews-2.0 that referenced this issue Jun 9, 2017
* 1. response 302 on redirecting in router
2. heartbeat: 5000 for Node.js 8, via webpack-contrib/webpack-hot-middleware#210 (comment)

* mistake

* Create setup-dev-server.js

* Create entry-server.js
@jptissot
Copy link

Seems to work fine on node 8.1.1

@antenando
Copy link

I can confirm it's working with node 8.1.1 as well

@michaeljonathanblack
Copy link

michaeljonathanblack commented Jun 16, 2017

Also confirmed! 💃

Just gotta update to 8.1.1 and it's golden.

@glenjamin
Copy link
Collaborator

Anyone know what changed in core to fix this for us?

@Rayraegah
Copy link
Author

Rayraegah commented Jun 16, 2017

Anyone know what changed in core to fix this for us?

@glenjamin it's both nodejs/node#13435 + nodejs/node#13391 and the one @brudil pointed out in his reply its nodejs/node#2534. They're all pointing to the same issue.

@glenjamin
Copy link
Collaborator

Cheers for the link, read through those and it looks like nodejs/node#13549 was the fix.

Gonna call this issue closed

@crifan
Copy link

crifan commented Nov 6, 2017

upgrade node to latest version(9.0.0):

node -v
sudo npm cache clean -f
sudo n stable
node -v

also fixed for me.

@olei
Copy link

olei commented Nov 28, 2017

The problem has been solved. thx

andriiwonderful added a commit to andriiwonderful/vue-hackernews-2.0 that referenced this issue Jul 21, 2023
* 1. response 302 on redirecting in router
2. heartbeat: 5000 for Node.js 8, via webpack-contrib/webpack-hot-middleware#210 (comment)

* mistake

* Create setup-dev-server.js

* Create entry-server.js
alejandro3899 pushed a commit to alejandro3899/vue-hackernews-2 that referenced this issue Feb 8, 2024
* 1. response 302 on redirecting in router
2. heartbeat: 5000 for Node.js 8, via webpack-contrib/webpack-hot-middleware#210 (comment)

* mistake

* Create setup-dev-server.js

* Create entry-server.js
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants