Issue Type: Bug
Selecting Remote Explorer, or hitting SSH Targets 'refresh' gives error
this.historyData[e].forEach is not a function
List of SSH targets is missing. Recreated ~/.ssh/config file, and reverted extension but issue persists. VSCode Insiders version is working with remote ssh.
Extension version: 0.50.0
VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:47:57.235Z)
OS version: Windows_NT x64 10.0.18363
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-4300U CPU @ 1.90GHz (4 x 2494)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.91GB (2.92GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|
Do you see that error with the latest version, or after reverting the extension?
See it in latest, and after reverting. Also tried removing extension and re-install. Also removed VSCode and re-installed. Same error persists.
See it in latest, and after reverting. Also tried removing extension and re-install. Also removed VSCode and re-installed. Same error persists.
Also, issue persists in older versions of extension. Suspect that if I could completely remove vscode and extensions then re-install it would remedy.
Same problem; tried the complete VSCode uninstall / reinstall (and moved my .vscode folder out of the way while it was uninstalled). Does not remedy the problem!
I got the same problem after update "Remote - SSH".
Recover the vision back to 0.49.0 then works.
Edited slightly for clarity:
I've hit this bug too, and reverting to 0.49.0 doesn't work for me as it breaks things on the remote (it's a shared account on the remote and other devs are presumably using the latest version there? - anyway, another workaround below).
However, I think the problem is due to an entry in my ssh config file (Users\%username%.ssh\config) for which VSCode has either generated some broken local data (the history data perhaps :) ) or not generated any data at all. (Actually, my guess is there's a historyData object which maps Host entries in .ssh\config to an array of history entries and there's no check that the array isn't undefined before iterating over it.)
Workaround: If I comment out this host or rename it (use an alias) it also works. i.e.
Host some-alias
Hostname actual.host.address
User some-user
...
becomes
Host some-alias-fixed
<everything else the same>
Edited slightly for clarity:
I've hit this bug too, and reverting to 0.49.0 doesn't work for me as it breaks things on the remote (it's a shared account on the remote and other devs are presumably using the latest version there? - anyway, another workaround below).
However, I think the problem is due to an entry in my ssh config file (Users%username%.ssh\config) for which VSCode has either generated some broken local data (the history data perhaps :) ) or not generated any data at all. (Actually, my guess is there's a historyData object which maps Host entries in .ssh\config to an array of history entries and there's no check that the array isn't undefined before iterating over it.)
Workaround: If I comment out this host or rename it (use an alias) it also works. i.e.
Host some-alias Hostname actual.host.address User some-user ...becomes
Host some-alias-fixed <everything else the same>
Great workaround! Works for me. TY
@elnotcho - should this be closed yet? I think it's still a bug (however we've all managed to do it, it's possible to get Code into a state which breaks in a hard-to-understand way).
Edited slightly for clarity:
I've hit this bug too, and reverting to 0.49.0 doesn't work for me as it breaks things on the remote (it's a shared account on the remote and other devs are presumably using the latest version there? - anyway, another workaround below).
However, I think the problem is due to an entry in my ssh config file (Users%username%.ssh\config) for which VSCode has either generated some broken local data (the history data perhaps :) ) or not generated any data at all. (Actually, my guess is there's a historyData object which maps Host entries in .ssh\config to an array of history entries and there's no check that the array isn't undefined before iterating over it.)
Workaround: If I comment out this host or rename it (use an alias) it also works. i.e.
Host some-alias Hostname actual.host.address User some-user ...becomes
Host some-alias-fixed <everything else the same>
For me its still not working.
By the way the same file works for me in vs code insiders.
Also seeing this, on 0.51.0, 0.50.1, and 0.50.0.
OpenSSH_for_Windows_8.1p1
Reverting to .49 fixed this for me.
Sorry for the late response here. I am not sure what the issue is. I pushed a change that works around it. It will be in the next "nightly" build of the extension, out in about 12 hours from now. It might not restore your old history but if you are seeing the error or not collecting history, it will fix that at least.
I think a change awhile ago to storing ssh target state was not handled correctly, but I haven't gotten reports of this in awhile, this should be resolved by now..
Most helpful comment
Edited slightly for clarity:
I've hit this bug too, and reverting to 0.49.0 doesn't work for me as it breaks things on the remote (it's a shared account on the remote and other devs are presumably using the latest version there? - anyway, another workaround below).
However, I think the problem is due to an entry in my ssh config file (Users\%username%.ssh\config) for which VSCode has either generated some broken local data (the history data perhaps :) ) or not generated any data at all. (Actually, my guess is there's a historyData object which maps Host entries in .ssh\config to an array of history entries and there's no check that the array isn't undefined before iterating over it.)
Workaround: If I comment out this host or rename it (use an alias) it also works. i.e.
becomes