vscode: Regressions with automatic port forwarding in VS Code

  • VS Code Version:

Version: 1.86.1 Commit: 31c37ee8f63491495ac49e43b8544550fbae4533 Date: 2024-02-07T09:08:57.920Z Electron: 27.2.3 ElectronBuildId: 26495564 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.3.0

Steps to Reproduce:

  1. Start a dev container that has the azd feature, like for https://github.com/Azure-Samples/azure-search-openai-demo/ (but I have replicated with all azd my dev containers)
  2. Run azd auth login
  3. Select the username to login as
  4. When it redirects to localhost, you’ll see that the localhost does not exist.
  5. Run curl on that URL inside VS Code, and you’ll see it does exist there, indicating that port forwarding failed.

I’ve also tried to replicate it in Insiders, but there I’m getting a different error with SSL.

I am going to CC @vhvb1989 to comment about how azd implements its local server, to see if that sheds light on why port forwarding is not working reliably.

Note that this did work for a long time, and only started failing in last few months.

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Reactions: 3
  • Comments: 17 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Proposed new behavior:

  • When remote.autoForwardPortsFallback has been configured, it is respected
  • When remote.autoForwardPortsSource has been configured as process and remote.autoForwardPortsFallback hasn’t been configured, then remote.autoForwardPortsFallback will be treated as though it’s set to 0.