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

WSL2 networking issue: unable to connect to localhost for dev server after update #6638

Closed
teikjun opened this issue Mar 6, 2021 · 8 comments

Comments

@teikjun
Copy link

teikjun commented Mar 6, 2021

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.804]
Your Distribution version: Ubuntu 18.04
Whether the issue is on WSL 2 and/or WSL 1: WSL2

Issue

Previously, I ran into this issue #6439 on build 19041.746. The issue was fixed after applying the fix detailed in #5298 (comment).

After updating to build 19041.804, the exact same problem has resurfaced. However, the same fix (#5298 (comment)) did not work anymore.

Please refer to #6439 for the full details of this issue. To summarize, I am unable to get the frontend and backend development server working together with WSL2. When the backend development server is accessed on localhost:8080, I receive a 404 error with no other errors logged in the console. When the frontend is accessed on localhost:4200, the page is rendered, but it cannot communicate with the backend. On the other hand, I am able to set up the dev server properly on a linux VM with the exact same steps. I am unable to pinpoint the specific issue in WSL2 that is causing this problem.

There were 2 updates that were installed together (either of which may have triggered the issue). They are:

What could the updates have changed to cause this networking issue in wsl2? Would appreciate any advice on how to resolve this.

Remarks

I have tried applying the suggested fixes in #4885, #4851 and #5298 - they do not resolve the issue.

@dchen327
Copy link

dchen327 commented Mar 7, 2021

I'm also on 10.0.19041.804, but I can't even get anything to show on localhost. I've tried npm run dev for a Next.js project, and a simple Python http server, but going to localhost:3000 or 127.0.0.1:3000 or 0.0.0.0:3000 just says it refused to connect.

Everything was working before I updated to 10.0.19041.804 I believe. I've tried toggling firewall with no effect, and my laptop doesn't have the option to disable fast startup (even after clicking change additional settings).

@dchen327
Copy link

dchen327 commented Mar 7, 2021

I uninstalled the recent Windows update (now I'm on 19041.746), and everything is working again. I'm clueless about what broke in the update, but I guess for now just downgrade if you can?

@teikjun
Copy link
Author

teikjun commented Mar 7, 2021

Thanks for the suggestion, I think downgrading would certainly fix the problem for now.

I would like to stay on an updated build, so I'm still trying to find a solution to this problem. So far, I've tried updating to a more recent version (20H2 build 19042.844), but the problem still persists.

@dchen327
Copy link

dchen327 commented Mar 7, 2021

Wow. Hopefully we get a fix soon!

@teikjun
Copy link
Author

teikjun commented Mar 12, 2021

@therealkenc Do you know if there are any updates in Windows Insider (slow ring) that may resolve this networking issue?

@dchen327
Copy link

For some reason, my localhost has broken again today (I haven't updated anything and it was working perfectly yesterday).

Is there a fix? This is incredibly annoying.

@therealkenc
Copy link
Collaborator

forward /dupe #6725 which has a repro.

@ghost
Copy link

ghost commented Mar 29, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants