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

DevContainers: net::ERR_CONTENT_LENGTH_MISMATCH through forwarded ports #9056

Closed
max06 opened this issue Oct 2, 2023 · 2 comments
Closed
Assignees
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster

Comments

@max06
Copy link

max06 commented Oct 2, 2023

Does this issue occur when all extensions are disabled?: Yes/No

Version: 1.83.0-insider (system setup)
Commit: 4268e464763087044d0c1b5bdd37ebbe683cadfa (latest)
Date: 2023-09-29T20:42:50.630Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621

⚠️ DevContainer in use! See example repository for reproduction.

While creating a new vue project, I noticed severe issues trying to see the page in action. Some (more or less random) resources can't seem to get fetched, the requests fail with net::ERR_CONTENT_LENGTH_MISMATCH.

Steps to Reproduce:

  1. Clone and launch the devcontainer in linked repository.
  2. Run bun i (or yarn i)
  3. Start dev server using bun run dev
  4. Launch browser on forwarded port 3000.
  5. Open your browsers devtools, switch to network tab, disable cache and hit reload.

The issue is recognizable by looking for (failed) in the status column.

I was not able to provoke the error using curl from inside the container, so I suspect vscode to actually cause the issue here.

For cross reference with the nuxt project, in case it's an issue with one of their changes: nuxt/cli#181

@chrmarti
Copy link
Contributor

chrmarti commented Oct 3, 2023

Could you check if it works when using "appPort": 3000 instead of "forwardPorts"?

@chrmarti chrmarti transferred this issue from microsoft/vscode Oct 3, 2023
@chrmarti chrmarti added containers Issue in vscode-remote containers info-needed Issue requires more information from poster labels Oct 3, 2023
@max06
Copy link
Author

max06 commented Oct 3, 2023

Actually the issue seemed to be another case of ipv4/v6 and nodejs in docker again, this time inside the nuxt-project. Very likely unrelated to vscode. A workaround/fix has been added to force ipv4.

Thanks for following up and sorry for the noise. I'll close this one unless there are new insights. 🙇🏼

@max06 max06 closed this as completed Oct 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

4 participants