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

Dev Containers with VS Code Remote on Windows do not support IPv6 loopback #10769

Open
7 tasks done
GingerGeek opened this issue Dec 14, 2024 · 1 comment · May be fixed by #10770
Open
7 tasks done

Dev Containers with VS Code Remote on Windows do not support IPv6 loopback #10769

GingerGeek opened this issue Dec 14, 2024 · 1 comment · May be fixed by #10770
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR.

Comments

@GingerGeek
Copy link
Contributor

GingerGeek commented Dec 14, 2024

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Dev Containers do not work out of box on Windows since Docker 26.

When Docusaurus is started via start or serve then the dev server will bind to an IPv6 loopback by default when listening to localhost.

VS Code remote does not support forwarding IPv6

Reproducible demo

No response

Steps to reproduce

  1. Clone the docusaurus repository or use a dev container configuration for a repo that uses Docusaurus (e.g. okd-project/okd-web)
  2. On a Windows machine running Docker 26+, open the project in dev container
  3. Run either docusaurus start or docusaurus serve
  4. Note how although port is reported as forwarded (3000) and the browser opens, it fails to connect and the browser times out

Expected behavior

The dev container works out of box with port forwarding

Actual behavior

The internal webpack dev server is binding only to an IPv6 loopback address.

This is due to a change in Docker Desktop introduced in v26 moby/moby#47062

Other projects have also been affected by this e.g. vitejs/vite#16522

An issue in VS Code remote has been open for some time for a resolution microsoft/vscode-remote-release#7029

Current workarounds in ViteJS include recommendations to alter Devcontianer to disable IPv6 or to manually set the address of the dev server to a V4 address (ie 127.0.0.1)

Your environment

  • Public source code: N/A (although present on okd-project/okd-web and this repo!)
  • Public site URL: N/A
  • Docusaurus version used: latest
  • Environment name and version (e.g. Chrome 89, Node.js 16.4):
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS):
WSL version: 2.3.22.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.65
MSRDC version: 1.2.5620
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.22635.4580
C:\Users\Zed> docker --version
Docker version 27.4.0, build bde2b89
C:\Users\Zed>

Self-service

  • I'd be willing to fix this bug myself.
@GingerGeek GingerGeek added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Dec 14, 2024
GingerGeek added a commit to GingerGeek/docusaurus that referenced this issue Dec 14, 2024
…e#7029 by using IPv4 loopback when in Remote Container environment
@GingerGeek GingerGeek linked a pull request Dec 14, 2024 that will close this issue
3 tasks
@slorber slorber added help wanted Asking for outside help and/or contributions to this particular issue or PR. and removed status: needs triage This issue has not been triaged by maintainers labels Dec 19, 2024
@slorber
Copy link
Collaborator

slorber commented Dec 19, 2024

Thanks for reporting.

I'm not super familiar with all that and won't be able to help much, but I hope someone from the community will be able to.

@slorber slorber linked a pull request Dec 26, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution help wanted Asking for outside help and/or contributions to this particular issue or PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants