Repository navigation
Command workbench.extensions.installExtension doesn't work on Remote Host #1144
Description
Issue Type: Bug
I working on extension which install updates from private network with command workbench.extensions.installExtension using VSIX. With local VSCode it works great, but on remote ssh host command can't find VSIX. I connect to remote host by ssh via Remote Development extension pack.
Steps to reproduce:
- Clone repo to local machine https://github.com/rusnasonov/remote-test
- Install extension
remote-test-0.0.1.vsixlocally withInstall from VSIXcommand. - Install extension
remote-test-0.0.2.vsixlocaly with extension commandInstall Package using workbench.extensions.installExtension(set full path to vsix package,readlink -f remote-test-0.0.2.vsixorrealpath remote-test-0.0.2.vsix). Now localy installedremote-test v0.0.2. - Open remote host by ssh via Remote Development.
- Copy
remote-test-0.0.1.vsixandremote-test-0.0.2.vsixto remote host (drag'n'drop in vscode, scp, etc.) - Run
Install from VSIX ...command on Remote host. It's open modal window with local file system (why?). Ok, chooseremote-test-0.0.1.vsixon local host. Nowremote-test-0.0.1.vsixinstalled on remote host. - Run
Install Package using workbench.extensions.installExtensionon remote host, set full path to vsix package on remote host in InputBox. Go toOutput -> Log (Window)and see exception
[2019-08-09 00:26:44.412] [renderer13] [error] ENOENT: no such file or directory, open '/home/perseus/remote-test-0.0.2.vsix': Error: ENOENT: no such file or directory, open '/home/perseus/remote-test-0.0.2.vsix'
at d (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5626:959)
at a.open (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:5628:538)
at /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules.asar/yauzl/index.js:34:21
at FSReqWrap.oncomplete (fs.js:141:20)
If set path to vsix from local host, exception stay similar.
[2019-08-09 00:33:14.721] [renderer13] [error] ENOENT: no such file or directory, open '/Users/perseus/Projects/private/remote-test/remote-test-0.0.2.vsix': Error: ENOENT: no such file or directory, open '/Users/perseus/Projects/private/remote-test/remote-test-0.0.2.vsix'
at u (/home/perseus/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529/out/vs/server/remoteExtensionHostAgent.js:330:96)
at a.open (/home/perseus/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529/out/vs/server/remoteExtensionHostAgent.js:331:649)
at /home/perseus/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529/node_modules/yauzl/index.js:34:21
at FSReqWrap.oncomplete (fs.js:141:20)
P.S.
New version of VSCode (1.37.0) on step 6 open Quick Pick with local file system, and now there is no way to install package with "Extensions: Install from VSIX" command.
Local host is OSX, remote is Ubuntu Bionic. In VSCode insiders on remote host opened modal window (step 6) with remote file system, but files still not found.
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:56:38.504Z)
OS version: Darwin x64 18.7.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.47GB free) |
| Process Argv | -psn_0_163880 |
| Screen Reader | no |
| VM | 0% |
Extensions (35)
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-sqlite | ale | 0.8.0 |
| language-hugo-vscode | bud | 0.11.0 |
| excel-to-markdown-table | csh | 1.1.0 |
| xml | Dot | 2.5.0 |
| es7-react-js-snippets | dsz | 2.4.0 |
| gitlens | eam | 9.9.3 |
| opensslutils | ffa | 1.1.1 |
| vscode-pull-request-github | Git | 0.9.2 |
| gc-excelviewer | Gra | 2.1.32 |
| vscode-systemd-support | han | 0.1.1 |
| plantuml | jeb | 2.11.2 |
| intellij-idea-keybindings | k-- | 0.2.34 |
| rainbow-csv | mec | 1.2.0 |
| vscode-cosmosdb | ms- | 0.10.2 |
| vscode-docker | ms- | 0.7.0 |
| python | ms- | 2019.8.29288 |
| remote-containers | ms- | 0.66.0 |
| remote-ssh | ms- | 0.45.2 |
| remote-ssh-edit | ms- | 0.45.3 |
| remote-ssh-explorer | ms- | 0.45.2 |
| remote-wsl | ms- | 0.38.10 |
| vscode-remote-extensionpack | ms- | 0.15.0 |
| azure-account | ms- | 0.8.4 |
| Go | ms- | 0.11.4 |
| vscode-typescript-tslint-plugin | ms- | 1.2.2 |
| debugger-for-chrome | msj | 4.11.7 |
| vscode-jscpd | pau | 0.3.4 |
| vscode-yandex-arc | per | 0.0.20 |
| remote-test | rus | 0.0.2 |
| vscode-hugo | rus | 0.8.0 |
| vscode-yandex-tracker | rus | 0.0.3 |
| vscode-yandex-wiki | rus | 1.2.1 |
| fish-vscode | sky | 0.2.1 |
| vscode-hexdump | sle | 1.7.2 |
| markdown-all-in-one | yzh | 2.4.2 |
Activity
sean-mcmanus commentedon Aug 10, 2019
This is causing remote users of the C/C++ extension to fail to be able to install our Insider vsix. In my repro, my host is Windows and target is WSL. We pass in "/tmp/tmp-num.vsix" (which exists inside WSL) but the remote VS Code tries to use the Windows path C:\tmp\tmp-num.visx and fails -- maybe it's incorrectly executing the command on the host instead of remote side?
perseus-fyi commentedon Aug 10, 2019
Maybe. I try to pass path to local vsix on remote host, and it doesn't work too.
Timmmm commentedon Aug 12, 2019
Is there a workaround for this? Can I install the vsix from the command line on the remote host?
perseus-fyi commentedon Aug 12, 2019
From command line probably not, because
.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529/bin/codebinary on remote host doesn't have options about extension management. You can try to download and extract you extension VSIX manually to.vscode-server/extensions/folder on remote host.Timmmm commentedon Aug 16, 2019
Thanks @rusnasonov that worked. For anyone else follow these steps:
extensionfolder to~/.vscode-server[-insiders]/extensions/ms-vscode.cpptools-0.25.0-insiders2(or whatever the version is).sandy081 commentedon Aug 19, 2019
/duplicate
This should be fixed by #1027
vscodebot commentedon Aug 19, 2019
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.
Happy Coding!