vscode: Port forwarding is not working

Type: Bug

Port forwarding over ssh is not working using vscode-insiders. It is working using vscode. How to replicate:

  1. start some http server on the remote
  2. add the port to be forwarded and select http as a protocol
  3. try opening in browser / doing a curl from your local machine
  4. the request is stuck pending

VS Code version: Code - Insiders 1.82.0-insider (f125afbc800ec611f5a9ab1333c769832ce424b3, 2023-08-21T05:32:43.957Z) OS version: Windows_NT x64 10.0.19045 Modes: Remote OS version: Linux x64 6.1.38-59.109.amzn2023.x86_64

System Info
Item Value
CPUs Intel® Core™ i5-10310U CPU @ 1.70GHz (8 x 2208)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 7.61GB (0.87GB free)
Process Argv –crash-reporter-id f7aa3253-abd1-4893-875c-3e87d67c8118
Screen Reader no
VM 0%
Item Value
Remote SSH: featureteam
OS Linux x64 6.1.38-59.109.amzn2023.x86_64
CPUs AMD EPYC 7571 (4 x 2199)
Memory (System) 15.45GB (8.90GB free)
VM 0%
Extensions (54)
Extension Author (truncated) Version
Handlebars and 0.4.1
vsc-python-indent Kev 1.18.0
dotenv mik 1.0.1
remote-containers ms- 0.305.0
remote-ssh ms- 0.105.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.81.0
vscode-remote-extensionpack ms- 0.24.0
remote-explorer ms- 0.4.1
remote-server ms- 1.4.2
material-icon-theme PKi 4.29.0
indent-one-space use 1.0.0
vscode-todo-highlight way 1.0.5
nugetpackagemanagergui ali 2.0.6
Handlebars and 0.4.1
vue-peek dar 1.0.2
vscode-markdownlint Dav 0.51.0
vscode-eslint dba 2.4.2
gitlens eam 2023.8.1905
EditorConfig Edi 0.16.4
prettier-vscode esb 10.1.0
vscode-jest-runner fir 0.4.66
copilot Git 1.104.347
copilot-chat Git 0.7.2023081801
vscode-github-actions git 0.26.1
todo-tree Gru 0.0.226
terraform has 2.27.2023071109
vscode-test-explorer hbe 2.21.1
vscode-nuget-package-manager jmr 1.1.6
roslynator jos 4.4.0
vsc-python-indent Kev 1.18.0
vscode-python-test-adapter lit 0.7.1
dotenv mik 1.0.1
vscode-scss mrm 0.10.0
vscode-docker ms- 1.26.0
csharp ms- 2.0.376
vscode-dotnet-runtime ms- 1.7.0
black-formatter ms- 2023.5.12151008
flake8 ms- 2023.7.12161007
isort ms- 2023.11.12061012
python ms- 2023.15.12302115
vscode-pylance ms- 2023.8.31
test-adapter-converter ms- 0.1.8
indent-rainbow ode 8.3.1
material-icon-theme PKi 4.29.0
prisma Pri 5.1.0
vscode-scss-formatter sib 3.0.0
indent-one-space use 1.0.0
intellicode-api-usage-examples Vis 0.2.7
vscodeintellicode Vis 1.2.30
vscode-conventional-commits viv 1.25.0
volar Vue 1.8.8
vscode-typescript-vue-plugin Vue 1.8.8
vscode-todo-highlight way 1.0.5

(2 theme extensions excluded)

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
vsc_aacf:30263846
pythonptprofiler:30281269
vsdfh931:30280409
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30404738
py29gd2263:30784851
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
showlangstatbar:30737417
7ij38806:30687742
pythonfmttext:30716741
pythoncmvfstr:30726892
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
gsofa:30797620
welcomedialog:30812478
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
copilotsettingt:30808721
asynctok:30815620
dsvsc013:30777762
dsvsc014:30777825
diffeditorv1:30786205
pythonmhint1:30815193

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed on the next Insiders. Good find, it was a latent issue that never got hit before. Root causing it was fun 😁

I still have this issue in the latest version:

Version: 1.82.0-insider
Commit: 083fca132543aa91a7e1de2dc23857d70ea56dd3
Date: 2023-08-25T05:44:25.625Z (23 hrs ago)

To reproduce:

  1. Use node script from here.
  2. Do a request from client side:
head -c 10000 /dev/urandom | curl 'http://127.0.0.1:9090/'  -X POST --data-binary @-
  1. Server side receives only the first chunk:
on req
on data 3726

After this, the request gets stuck and never ends.

In my case, the issue mostly affects small requests. A 10kb request always has the issue, but a 100kb request seems to be consistently fine. Size of the response also seems to be important.

I connected to a distant server (with a ping of ~300 ms), but there doesn’t seem to be any problem with the connection itself.