Repository navigation
Description
Issue Type: Bug
-
Go to VS Code settings, section Application>Proxy.
-
See Proxy setting whose clarification is "The proxy setting to use. If not set, will be inherited from the http_proxy and https_proxy environment variables."
-
Set environment variable http_proxy.
-
Do networking stuff. E.g. try to sign in to Azure via Azure Account Extension: Press F1 ">Azure: Sign In".
-
Get Error notification saying "You appear to be offline. Please check your network connection." which is generated by Azure Account Extension.
-
Go to Settings.json, set "http.proxy": "http://server:port"
-
Try to log in again.
-
Success!
I consider this a Bug, as the help text in the settings dialogue states that environment variables are loaded and used centrally, when they are not.
Further more, it is not the case that proxy settings can't be used by the extension since written directly into the settings.json everything works.
VS Code version: Code 1.40.1 (8795a98, 2019-11-13T16:49:35.976Z)
OS version: Windows_NT x64 10.0.17763
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Xeon(R) CPU E3-1505M v5 @ 2.80GHz (8 x 2808) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_renderer: disabled_off surface_control: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: enabled_on viz_hit_test_surface_layer: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 31.92GB (24.07GB free) |
| Process Argv | |
| Screen Reader | no |
| VM | 0% |
Extensions (9)
| Extension | Author (truncated) | Version |
|---|---|---|
| python | ms- | 2019.10.44104 |
| vscode-ai | ms- | 0.6.7 |
| azure-account | ms- | 0.8.7 |
| team | ms- | 1.161.0 |
| azure-iot-edge | vsc | 1.18.0 |
| azure-iot-toolkit | vsc | 2.13.0 |
| azure-iot-tools | vsc | 0.3.0 |
| vscode-iot-device-cube | vsc | 0.1.4 |
| vscode-iot-workbench | vsc | 0.10.16 |
Activity
vscodebot commentedon Nov 14, 2019
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
simue commentedon Nov 14, 2019
Based on the observation, that setting the proxy address explicitly via the setting dialogue or in settings.json, I disagree the classification of this Issue as a duplicate.
chrmarti commentedon Nov 15, 2019
Try setting the proxy environment variable and then restart VS Code (if that doesn't work try rebooting the machine after setting the environment variable). We do look at the environment variables, note that if the setting is present, that wins over the environment variables.
vscodebot commentedon Nov 25, 2019
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!
simue commentedon Nov 26, 2019
Thank you for your input!
I did restart the PC after removing the explicit proxy setting and assuring that the environment variable is set correctly. This did not work. The environment variable was written all uppercase: HTTP_PROXY.
I then changed it to all lowercase which worked fine.
Additionally, since my last post here I observed the behaviour of the Sign In. Most of the times it worked, sometimes not. I can not see a pattern there. Maybe it also didn't not work because of the uppercase/lowercase, but because of other reasons (maybe not in relation to VS Code and the Azure plugin)?
Could you please confirm/disprove the uppercase/lowercase suspicion?
chrmarti commentedon Nov 27, 2019
I read the lower- and uppercase names:
vscode/src/vs/workbench/services/extensions/node/proxyResolver.ts
Line 61 in 615732f
Note that the setting wins over the environment variables. So if the setting had an invalid value, that would be tried and not the environment variables.
simue commentedon Nov 27, 2019
The proxy setting was empty.
Are there any logfiles that one could look into when the error occurs again?
chrmarti commentedon Nov 28, 2019
You can set the log level to
Trace(F1>Developer: Set Log Level...) to get logging in the Output panel's Extension Host channel. Look for lines with 'ProxyResolver#'.simue commentedon Dec 2, 2019
Will this have to be done after every start of VS Code, or is this a permanent setting?
chrmarti commentedon Dec 2, 2019
The log level is preserved for as long as at least one window is open (or being reloaded).
simue commentedon Dec 5, 2019
Since the problem did, until now, not reoccur, I assume that this issue is related to my company's proxy.
If the problem reoccurs, I am going to get the logs and get back here.
Thank you very much for your help!