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

No data received ERR_EMPTY_RESPONSE #183

Closed
aesopwolf opened this issue May 23, 2015 · 27 comments
Closed

No data received ERR_EMPTY_RESPONSE #183

aesopwolf opened this issue May 23, 2015 · 27 comments

Comments

@aesopwolf
Copy link

I followed http://webpack.github.io/docs/tutorials/getting-started/ exactly, and the last step

webpack-dev-server --progress --colors results in this error

image

I've tried

@alextiley
Copy link

Did you ever figure this out? I have the exact same problem...in the console I'm seeing this:

GET http://localhost:3002/socket.io/?EIO=3&transport=polling&t=1438181843342-11 net::ERR_EMPTY_RESPONSE

I'm using vagrant with a private network. I'm not sure if that has anything to do with it.

@aesopwolf
Copy link
Author

I can't remember what I did to fix it. I think I wiped everything and started from scratch... I vaguely remember thinking it was a user (my) error though.

@alextiley
Copy link

@aesopwolf Thanks, think I'll start again 👍

@fredantell
Copy link

@alextiley If you solve this, would love to hear what you did. We're currently running into this right now. Works on 3 machines, fails on 1. I'll post back if we figure it out.

@nbollepalli
Copy link

@aesopwolf, I am running into the exact same issue and I have tried to run everything from scratch as well. Did you figure out what exactly was leading to the issue? It will help me tremendously if you know the answer. Thanks!

@fredantell
Copy link

To follow up, I'm not sure that we really solved the problem, but we did work around it. On the machine that was having issues, accessing the server from http://127.0.0.1:8080/ worked where http://localhost:8080/ failed. This is despite the /etc/hosts file appearing to be correct, and despite the fact that a python SimpleHTTPServer was accessible via http://localhost:8080/ with no issues.

In addition to that workaround, we also dropped our repo into a docker container. In order to make that function properly we added a "-host 0.0.0.0" flag to the command to launch the server. In the end it became:
"webpack-dev-server --hot --host 0.0.0.0 --progress --colors"
and our webpack.config.js had this entry:
entry: {
app: [
"webpack-dev-server/client?:8080/", //fix issues with socket.io and live reloading
'webpack/hot/dev-server',
.......
]
}

@amannn
Copy link

amannn commented Aug 10, 2015

I've got the same issue. Also in the console webpack doesn't output the stats anymore …

@ariley90
Copy link

ariley90 commented Oct 8, 2015

Did anyone ever figure out how to resolve this? I'm experiencing the exact same behaviour as @fredantell. Localhost host works fine for everything but webpack-dev-server.

@MikeStankavich
Copy link

Try using 127.0.0.1 or another alias from /etc/hosts. You'll need to use a matching --host parameter when you start webpack-dev-server and may need to update output.publicPath in your config as well.

Here's how I did it.

in /etc/hosts:
127.0.0.1 cheetah

in webpack.config.js:
output.publicPath = 'http://cheetah:8080/';

command line:
webpack-dev-server --host cheetah

** PS ** this was simplified from my actual configuration.

@zzz6519003
Copy link

guess you should check if there's some proxy extension on your chrome XD

@zzz6519003
Copy link

or shadow sock something

@jbschrades
Copy link

This might help some of you. I was experiencing the same issue running a vagrant VM with port forwarding on port 3000. I could curl http://localhost:3000 from within the VM but content wasn't getting forwarded. By default, webpack-dev-server binds to localhost (127.0.0.1) which is a loopback address. Therefore you need to add --host 0.0.0.0 to your webpack-dev-server command. Mine:

webpack-dev-server --hot --progress --colors --host 0.0.0.0 --port 3000

No other changes were necessary.

@fredantell provides a similar solution above.

@quantuminformation
Copy link

I had to use 127.0.0.1

@Bhupeshpatel
Copy link

@jbschrades Thank you so much for the solution. It worked for me!

@SunJieMing
Copy link

I was able to solve this issue by doing this as well:

webpack-dev-server --port 3000

@Loogeek
Copy link

Loogeek commented May 2, 2016

webpack-dev-server --inline --hot --progress --colors --host 0.0.0.0 --port 4000

@teazean
Copy link

teazean commented Jun 7, 2016

problem: localhost:8080 failed but 127.0.0.1:8080 worked
i resolved this problem by delete the line '::1 localhost' in the /etc/hosts

@KayBeSee
Copy link

KayBeSee commented Aug 1, 2016

I was able to delete '::1 localhost' in /etc/hosts and it works now

@SpaceK33z
Copy link
Member

Closing because these issues do seem to fix themselves, and we can't do nothing about it here in webpack-dev-server. Feel free to comment though.

@alanmacleod
Copy link

I had this problem; turns out I had an errant Docker container running in the background from another project listening on the same port (no http errors shown in webpack-dev-server though - watch out!). Stopped the containers, then everything worked @ localhost:8080

gcallaghan added a commit to gcallaghan/netlify-cms that referenced this issue Nov 10, 2017
When walking through the setup documentationn I was unable to access the dev
server on localhost:8080 on Mac OSX. I attempted to implement the
workarounds suggested at
webpack/webpack-dev-server#183 to no avail.
This change allowed me to follow the output of the webpack dev server
directly and see all assets from the browser.
gcallaghan added a commit to gcallaghan/netlify-cms that referenced this issue Nov 10, 2017
When walking through the setup documentationn I was unable to access the dev
server on localhost:8080 on Mac OSX. I attempted to implement the
workarounds suggested at
webpack/webpack-dev-server#183 to no avail.
This change allowed me to follow the output of the webpack dev server
directly and see all assets from the browser.
gcallaghan added a commit to gcallaghan/netlify-cms that referenced this issue Nov 10, 2017
**- Summary**

When walking through the setup documentationn I was unable to access the dev
server on localhost:8080 on Mac OSX. I attempted to implement the
workarounds suggested at
webpack/webpack-dev-server#183 to no avail.
This change allowed me to follow the output of the webpack dev server
directly and see all assets from the browser.

**- Test plan**

grant at McBeast in ~/work/netlify-cms on origin/master
$ npm start

> netlify-cms@0.7.0 start /Users/grant/work/netlify-cms
> webpack-dev-server -d --config webpack.dev.js

Project is running at http://127.0.0.1:8080/
webpack output is served from http://127.0.0.1:8080/
Content not from webpack is served from example/
404s will fallback to /index.html
You are using @apply rule and custom property sets.
This feature won't be included in next the major release of postcss-cssnext.
This most likely won't get any more support from browser vendors as the spec is yet considered deprecated and alternative solutions are being discussed.
Read more about the reason here https://github.com/pascalduez/postcss-apply.
Hash: 0971a643d3190ae4b6d6
Version: webpack 3.6.0
Time: 14312ms
                                 Asset     Size  Chunks                    Chunk Names
  40b2ba67cfdebc631c5942867695a2e2.eot  83.4 kB          [emitted]
570eb83859dc23dd0eec423a49e147fe.woff2  44.3 kB          [emitted]
 012cf6a10129e2275d79d6adac7f3b02.woff  57.6 kB          [emitted]
  a37b0c01c0baf1888ca812cc0508f6e2.ttf   128 kB          [emitted]
e5147f7843186e46490bd896d6a85abf.woff2  41.3 kB          [emitted]
 3360b1d4036d32df1e555e993b30946c.woff  50.4 kB          [emitted]
  c8c19ba3328799e7bb03f3b47c40dba2.ttf  83.3 kB          [emitted]
  db4e36de8364fc2444c5ed0443c04da4.svg   121 kB          [emitted]
                                cms.js  15.8 MB       0  [emitted]  [big]  cms
   [0] ./node_modules/react/index.js 190 bytes {0} [built]
 [378] (webpack)-dev-server/client/overlay.js 3.73 kB {0} [built]
 [380] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
 [631] multi (webpack)-dev-server/client?http://127.0.0.1:8080 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://127.0.0.1:8080/ ./index 76 bytes {0} [built]
 [632] (webpack)-dev-server/client?http://127.0.0.1:8080 7.23 kB {0} [built]
 [675] (webpack)/hot/dev-server.js 1.61 kB {0} [built]
 [676] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built]
 [677] ./node_modules/react-hot-loader/patch.js 41 bytes {0} [built]
 [678] ./node_modules/react-hot-loader/lib/patch.js 209 bytes {0} [built]
 [750] (webpack)-dev-server/client?http://127.0.0.1:8080/ 7.23 kB {0} [built]
 [751] ./src/index.js 2.27 kB {0} [built]
 [766] ./node_modules/react-hot-loader/index.js 41 bytes {0} [built]
 [778] ./node_modules/normalize.css/normalize.css 960 bytes {0} [built]
[1592] ./src/index.css 1.16 kB {0} [built]
[1600] ./src/utils.css 1.16 kB {0} [built]
    + 1586 hidden modules
webpack: Compiled successfully.

**- Description for the changelog**

Set dev server to 127.0.0.1
gcallaghan added a commit to gcallaghan/netlify-cms that referenced this issue Nov 10, 2017
**- Summary**

When walking through the setup documentationn I was unable to access the dev
server on localhost:8080 on Mac OSX. I attempted to implement the
workarounds suggested at
webpack/webpack-dev-server#183 to no avail.
This change allowed me to follow the output of the webpack dev server
directly and see all assets from the browser.

**- Test plan**

grant at McBeast in ~/work/netlify-cms on origin/master
$ npm start

> netlify-cms@0.7.0 start /Users/grant/work/netlify-cms
> webpack-dev-server -d --config webpack.dev.js

Project is running at http://127.0.0.1:8080/
webpack output is served from http://127.0.0.1:8080/
Content not from webpack is served from example/
404s will fallback to /index.html
You are using @apply rule and custom property sets.
This feature won't be included in next the major release of postcss-cssnext.
This most likely won't get any more support from browser vendors as the spec is yet considered deprecated and alternative solutions are being discussed.
Read more about the reason here https://github.com/pascalduez/postcss-apply.
Hash: 0971a643d3190ae4b6d6
Version: webpack 3.6.0
Time: 14312ms
                                 Asset     Size  Chunks                    Chunk Names
  40b2ba67cfdebc631c5942867695a2e2.eot  83.4 kB          [emitted]
570eb83859dc23dd0eec423a49e147fe.woff2  44.3 kB          [emitted]
 012cf6a10129e2275d79d6adac7f3b02.woff  57.6 kB          [emitted]
  a37b0c01c0baf1888ca812cc0508f6e2.ttf   128 kB          [emitted]
e5147f7843186e46490bd896d6a85abf.woff2  41.3 kB          [emitted]
 3360b1d4036d32df1e555e993b30946c.woff  50.4 kB          [emitted]
  c8c19ba3328799e7bb03f3b47c40dba2.ttf  83.3 kB          [emitted]
  db4e36de8364fc2444c5ed0443c04da4.svg   121 kB          [emitted]
                                cms.js  15.8 MB       0  [emitted]  [big]  cms
   [0] ./node_modules/react/index.js 190 bytes {0} [built]
 [378] (webpack)-dev-server/client/overlay.js 3.73 kB {0} [built]
 [380] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
 [631] multi (webpack)-dev-server/client?http://127.0.0.1:8080 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://127.0.0.1:8080/ ./index 76 bytes {0} [built]
 [632] (webpack)-dev-server/client?http://127.0.0.1:8080 7.23 kB {0} [built]
 [675] (webpack)/hot/dev-server.js 1.61 kB {0} [built]
 [676] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built]
 [677] ./node_modules/react-hot-loader/patch.js 41 bytes {0} [built]
 [678] ./node_modules/react-hot-loader/lib/patch.js 209 bytes {0} [built]
 [750] (webpack)-dev-server/client?http://127.0.0.1:8080/ 7.23 kB {0} [built]
 [751] ./src/index.js 2.27 kB {0} [built]
 [766] ./node_modules/react-hot-loader/index.js 41 bytes {0} [built]
 [778] ./node_modules/normalize.css/normalize.css 960 bytes {0} [built]
[1592] ./src/index.css 1.16 kB {0} [built]
[1600] ./src/utils.css 1.16 kB {0} [built]
    + 1586 hidden modules
webpack: Compiled successfully.

**- Description for the changelog**

Set dev server to 127.0.0.1
gcallaghan added a commit to gcallaghan/netlify-cms that referenced this issue Nov 10, 2017
**- Summary**

When walking through the setup documentationn I was unable to access the dev
server on localhost:8080 on Mac OSX. I attempted to implement the
workarounds suggested at
webpack/webpack-dev-server#183 to no avail.
This change allowed me to follow the output of the webpack dev server
directly and see all assets from the browser.

**- Test plan**

grant at McBeast in ~/work/netlify-cms on origin/master
$ npm start

> netlify-cms@0.7.0 start /Users/grant/work/netlify-cms
> webpack-dev-server -d --config webpack.dev.js

Project is running at http://127.0.0.1:8080/
webpack output is served from http://127.0.0.1:8080/
Content not from webpack is served from example/
404s will fallback to /index.html
You are using @apply rule and custom property sets.
This feature won't be included in next the major release of postcss-cssnext.
This most likely won't get any more support from browser vendors as the spec is yet considered deprecated and alternative solutions are being discussed.
Read more about the reason here https://github.com/pascalduez/postcss-apply.
Hash: 0971a643d3190ae4b6d6
Version: webpack 3.6.0
Time: 14312ms
                                 Asset     Size  Chunks                    Chunk Names
  40b2ba67cfdebc631c5942867695a2e2.eot  83.4 kB          [emitted]
570eb83859dc23dd0eec423a49e147fe.woff2  44.3 kB          [emitted]
 012cf6a10129e2275d79d6adac7f3b02.woff  57.6 kB          [emitted]
  a37b0c01c0baf1888ca812cc0508f6e2.ttf   128 kB          [emitted]
e5147f7843186e46490bd896d6a85abf.woff2  41.3 kB          [emitted]
 3360b1d4036d32df1e555e993b30946c.woff  50.4 kB          [emitted]
  c8c19ba3328799e7bb03f3b47c40dba2.ttf  83.3 kB          [emitted]
  db4e36de8364fc2444c5ed0443c04da4.svg   121 kB          [emitted]
                                cms.js  15.8 MB       0  [emitted]  [big]  cms
   [0] ./node_modules/react/index.js 190 bytes {0} [built]
 [378] (webpack)-dev-server/client/overlay.js 3.73 kB {0} [built]
 [380] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} [built]
 [631] multi (webpack)-dev-server/client?http://127.0.0.1:8080 webpack/hot/dev-server react-hot-loader/patch webpack-dev-server/client?http://127.0.0.1:8080/ ./index 76 bytes {0} [built]
 [632] (webpack)-dev-server/client?http://127.0.0.1:8080 7.23 kB {0} [built]
 [675] (webpack)/hot/dev-server.js 1.61 kB {0} [built]
 [676] (webpack)/hot/log-apply-result.js 1.31 kB {0} [built]
 [677] ./node_modules/react-hot-loader/patch.js 41 bytes {0} [built]
 [678] ./node_modules/react-hot-loader/lib/patch.js 209 bytes {0} [built]
 [750] (webpack)-dev-server/client?http://127.0.0.1:8080/ 7.23 kB {0} [built]
 [751] ./src/index.js 2.27 kB {0} [built]
 [766] ./node_modules/react-hot-loader/index.js 41 bytes {0} [built]
 [778] ./node_modules/normalize.css/normalize.css 960 bytes {0} [built]
[1592] ./src/index.css 1.16 kB {0} [built]
[1600] ./src/utils.css 1.16 kB {0} [built]
    + 1586 hidden modules
webpack: Compiled successfully.

**- Description for the changelog**

Set dev server to 127.0.0.1
@ito2307
Copy link

ito2307 commented Dec 1, 2017

aepsilon/turing-machine-viz#1 someone can help me please i want install this project

@shellscape
Copy link
Contributor

@ito2307 please try using Stack Overflow for support questions. the issues here are debugging and improving the project itself.

@SkyCo
Copy link

SkyCo commented Nov 20, 2018

Maybe you could try it that turn "Global Mode" to "Auto Proxy Mode" in ShadowsocksX.

@grantperry
Copy link

Ran a docker prune and re-built my images. Fixed. Probably could have restart the docker engine???

@gibumkang
Copy link

gibumkang commented May 30, 2019

You can also change the port directly in the webpack.config.js file:

devServer: {
      port: 8000
  }

@onurusluca
Copy link

In my case it was caused by my VPN

@mindplay-dk
Copy link

In my case, the confusion was VS Code offering to open a browser - it uses an http URL rather than https, which was required for the dev host I was trying to open. (since it is also proxying a backend API server.)

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