-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Connection to localhost does not work on Mac due to IPv6 #2272
Comments
I think you have broken hosts file (or maybe something other works not as expected), because localhost should be always resolve as 0.0.0.0 !== 127.0.0.1 |
This happened to me after upgrading to Catalina. The fix above worked for me. |
@ErikMikkelson hm, maybe regression in new What |
Ugh, finally found an answer via this other person. Bloody antivirus! They basically intercept every connection to
Sorry for blaming you guys! I'd suggest using a different default port, but frankly this is ESET's fault & fuck those guys. |
@Timmmm thanks for feedback and investigation, good job! |
I am here with the same issue but for local domains. Previously any local domain host entry like I dug up an old site and it would not resolve, I can't even ping it. But as soon as I add 127.0.0.1 it works again 🤷♂️. |
Operating System: macOS 10.14.4
Node Version: 10.16.0
NPM Version: 6.9.0
webpack Version: 4.41.0
webpack-dev-server Version: 3.8.1
Browser: Electron 6
This is a bug
This is a modification request
Code
Create a default project like this:
Run the electron app:
Or run the web server:
Expected Behavior
App running at: - Local: http://localhost:8080/
) should work.Actual Behavior
You get a blank electron app, and http://localhost:8080/ does not load. The problem is that
webpack-dev-server
actually listens on127.0.0.1
(or maybe0.0.0.0
), but somewhere in its code it says "Oh ... 127.0.0.1? Silly users won't understand that! I'll replace it withlocalhost
which is much more friendly."A gallant aim perhaps, but not a robust one. On Mac
localhost
resolves to::1
, not127.0.0.1
. Since Electron and the web browser have been told to connect tolocalhost
(::1
) but the server is actually listening on127.0.0.1
, they do not work.A workaround is to put this in your
vue.config.js
file:I also reported this bug to
vue-cli
but I'm pretty sure the problem is actually inwebpack-dev-server
.The text was updated successfully, but these errors were encountered: