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

Command workbench.extensions.installExtension doesn't work on Remote Host #1144

Closed
rndev-io opened this issue Aug 8, 2019 · 7 comments
Closed
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@rndev-io
Copy link

rndev-io commented Aug 8, 2019

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:

  1. Clone repo to local machine https://github.com/rusnasonov/remote-test
  2. Install extension remote-test-0.0.1.vsix locally with Install from VSIX command.
  3. Install extension remote-test-0.0.2.vsix localy with extension command Install Package using workbench.extensions.installExtension (set full path to vsix package, readlink -f remote-test-0.0.2.vsix or realpath remote-test-0.0.2.vsix ). Now localy installed remote-test v0.0.2.
  4. Open remote host by ssh via Remote Development.
  5. Copy remote-test-0.0.1.vsix and remote-test-0.0.2.vsix to remote host (drag'n'drop in vscode, scp, etc.)
  6. Run Install from VSIX ... command on Remote host. It's open modal window with local file system (why?). Ok, choose remote-test-0.0.1.vsix on local host. Now remote-test-0.0.1.vsix installed on remote host.
  7. Run Install Package using workbench.extensions.installExtension on remote host, set full path to vsix package on remote host in InputBox. Go to Output -> 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
@sean-mcmanus
Copy link

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?

@rndev-io
Copy link
Author

Maybe. I try to pass path to local vsix on remote host, and it doesn't work too.

@Timmmm
Copy link

Timmmm commented Aug 12, 2019

Is there a workaround for this? Can I install the vsix from the command line on the remote host?

@rndev-io
Copy link
Author

From command line probably not, because .vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529/bin/code binary 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
Copy link

Timmmm commented Aug 16, 2019

Thanks @rusnasonov that worked. For anyone else follow these steps:

  1. Uninstall the existing extension on the remote.
  2. Download and unzip the VSIX somewhere.
  3. Move the resulting extension folder to ~/.vscode-server[-insiders]/extensions/ms-vscode.cpptools-0.25.0-insiders2 (or whatever the version is).

@sandy081
Copy link
Member

/duplicate

This should be fixed by #1027

@vscodebot vscodebot bot added the *duplicate Issue identified as a duplicate of another issue(s) label Aug 19, 2019
@vscodebot
Copy link

vscodebot bot commented 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!

@vscodebot vscodebot bot closed this as completed Aug 19, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants