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

Stuck while trying to install plugins in WSL using corporate proxy #101297

Open
orgi opened this issue Jun 29, 2020 · 16 comments
Open

Stuck while trying to install plugins in WSL using corporate proxy #101297

orgi opened this issue Jun 29, 2020 · 16 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies remote Remote system operations issues

Comments

@orgi
Copy link

orgi commented Jun 29, 2020

  • VSCode Version: 1.46.1
  • OS Version: Win10 2004
  • Tried both using WSL1 and WSL2, both running Ubuntu 20.04

I'm running code behind a corporate network, have http_proxy and https_proxy (on both Windows and WSL set to the respective proxy server.
Internet access is both working for Windows (and plugin install, too) and from WSL side (except the code plugin installation.

Maybe I missed the instructions on how to operate visual studio code with WSL + proxy?

Steps to Reproduce:

  1. Open vscode from WSL: code .
  2. Try installing any of the already installed plugins into WSL, e.g. git lens
  3. After clicking the button labelled 'Install in WSL: <wsl name>' mostly nothing happens. Sometimes the button text changes to 'Installing' for some time - however it will be then stuck there. There's no progress or error message in any case.

I checked the local and remote extensions host log, too - with trace enabled:

For WSL1 the following entries could be found in the log:

[2020-06-29 18:25:53.882] [remoteagent] [trace] ExtensionManagementService.refreshReportedCache
[2020-06-29 18:25:53.882] [remoteagent] [trace] RequestService#request https://az764295.vo.msecnd.net/extensions/marketplace.json
[2020-06-29 18:26:29.562] [remoteagent] [trace] Started scanning system extensions
[2020-06-29 18:26:29.562] [remoteagent] [trace] Started scanning user extensions
[2020-06-29 18:26:29.564] [remoteagent] [trace] Scanned user extensions: 0
[2020-06-29 18:26:29.611] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/fooUser/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/extensions/node_modules/package.json"}

For WSL2 the same looked like:

[2020-06-29 18:24:31.296] [remoteagent] [trace] {"errno":-2,"code":"ENOENT","syscall":"open","path":"/root/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/extensions/node_modules/package.json"}
[2020-06-29 18:24:31.300] [remoteagent] [trace] Scanned system extensions: 30
[2020-06-29 18:24:43.700] [remoteagent] [trace] ExtensionManagementService.refreshReportedCache
[2020-06-29 18:24:43.701] [remoteagent] [trace] RequestService#request https://az764295.vo.msecnd.net/extensions/marketplace.json
[2020-06-29 18:29:13.672] [remoteagent] [trace] Started scanning user extensions
[2020-06-29 18:29:13.673] [remoteagent] [trace] Scanned user extensions: 0
[2020-06-29 18:31:04.845] [remoteagent] [trace] Started scanning system extensions

I checked the trace log after starting code using --log=trace - there seem to be some errors during the plugin discovery - however I'm not sure.

I attached a slightly modified version (replaced my user name - and left only the tail of the log) of the log.
sharedprocess.log

Does this issue occur when all extensions are disabled?: n/a

@joaomoreno joaomoreno assigned chrmarti and unassigned joaomoreno Jun 30, 2020
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies remote Remote system operations issues labels Jun 30, 2020
@orgi
Copy link
Author

orgi commented Jul 6, 2020

btw.: I just verified that when installing the native linux code binaries - and using them from within WSL - I'm able to install plugins. Unfortunately they will not show up as installed when I connect using the WSL connection from the Windows VSCode.
Is there probably a workaround to install the plugins manually?

@chrmarti
Copy link
Contributor

chrmarti commented Jul 7, 2020

You can browse and download the extensions on the marketplace (https://marketplace.visualstudio.com/vscode) and then install them while you are connect to WSL (that will install them in WSL, not locally) using F1 > Extensions: Install Form VSIX....

@orgi
Copy link
Author

orgi commented Jul 7, 2020

Thanks for the hint. Unfortunately it still does not work - still seems to be stuck here (tried git graph and git blame plugin using the install from vsix method):
image

Maybe this is not related to the proxy at all. Maybe the firewall blocks this somehow, although I can use the WSL connection for editing code, opening a terminal etc. The only thing that does not seem to work is the plugin installation.

@chrmarti
Copy link
Contributor

chrmarti commented Jul 8, 2020

You would use the website I linked to search for "git" and download the VSIX. Not the built-in extension search in VS Code.

@orgi
Copy link
Author

orgi commented Jul 8, 2020

Sorry for the confusion created by that screen shot. Actually I did download it manually and use the Install from vsix option. Just searched for git in the built in extension view to see whether anything happened.
However no changes there :(
Not sure why it does not work.

@orgi
Copy link
Author

orgi commented Jul 8, 2020

If there’s any other log files I could provide please let me know. Actually have to admit that I forgot how to retrieve the logs I did when submitting the issue 😖

@orgi
Copy link
Author

orgi commented Jul 8, 2020

Ok - seems like that when waiting long enough (~ 5 - 10 min) at some point at least the vsix installation seems to work, :)
Currently waiting to see whether the built-in extensions manager will do something at some point, too.

@orgi
Copy link
Author

orgi commented Jul 9, 2020

Update: While the vsix installation worked - as mentioned in the previous note - the built-in extension installer won't. After a while it will show something as follows (the upper two plugins I installed using the manual installation):
image

It's now stuck there since yesterday afternoon ~ 12 h.

Must be something related the proxy and/or firewall configuration. However I don't have a clue where to look. Would be grateful for any pointers.

@chrmarti
Copy link
Contributor

chrmarti commented Jul 9, 2020

@sandy081 For the VSIX installation taking long / hanging.

@sandy081
Copy link
Member

While installing from VSIX I reach to Marketplace to get metadata of the extension if exists.

@sandy081 sandy081 removed their assignment Jul 17, 2020
@eladavron
Copy link

Using VSIX also isn't much of a solution.
Remote / WSL server needs to respect proxy settings or at the very least have its own proxy settings configurable.

@orgi
Copy link
Author

orgi commented Mar 16, 2021

Not sure whether there has been some changes to the corporate proxy setup - however at least for me it is back working using the latest versions of vscode.

@eladavron
Copy link

eladavron commented Mar 16, 2021

For me it still gives this message:

[2021-03-16 14:05:56.668] [remoteagent] [error] Failed to install extension: njpwerner.autodocstring connect ETIMEDOUT 68.232.34.200:443

And if I try to install something with dependencies through VSIX (like Python):

[2021-03-16 14:13:42.588] [remoteagent] [error] Failed to install extension: ms-toolsai.jupyter connect ETIMEDOUT 68.232.34.200:443
[2021-03-16 14:13:42.612] [remoteagent] [warning] Cannot install dependencies of extension: ms-python.python connect ETIMEDOUT 68.232.34.200:443

This despite having the proxy defined in my settings, in my WSL environment variables, etc...

VSCode version 1.54.3

@hagejosephPFG
Copy link

I set my proxy settings in .wgetrc and it resolved the issue.

@AkshayRoyal
Copy link

Hi @hagejosephPFG I am also facing the same issue can you please tell where is .wgetrc and how did your .wgetrc look like after adding proxy settings to it

@hagejosephPFG
Copy link

Hi @hagejosephPFG I am also facing the same issue can you please tell where is .wgetrc and how did your .wgetrc look like after adding proxy settings to it

See here: https://stackoverflow.com/questions/11211705/how-to-set-proxy-for-wget#answer-11211812

I set those three items in ~/.wgetrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug proxy Issues regarding network proxies remote Remote system operations issues
Projects
None yet
Development

No branches or pull requests

7 participants