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

Error: Request failed: Proxy Authentication Required #685

Open
WeiterWeiterFertigstellen opened this issue Aug 31, 2023 · 2 comments
Open

Comments

@WeiterWeiterFertigstellen

Describe the bug
We use a http proxy with authentication. Is it possible to use the proxy set in the Windows system settings or specify one?

[2023-08-31 05:57:30:437] [INFO] Starting moocfi.test-my-code in "production" mode.
[2023-08-31 05:57:30:437] [INFO] Visual Studio Code version: 1.81.1
[2023-08-31 05:57:30:437] [INFO] moocfi.test-my-code version: 2.1.5
[2023-08-31 05:57:30:437] [INFO] Currently open workspace: undefined
[2023-08-31 05:57:30:437] [INFO] Platform win32 Arch x64
[2023-08-31 05:57:30:437] [INFO] TMC-Langs version: tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe
[2023-08-31 05:57:30:439] [INFO] Downloading TMC-langs from https://download.mooc.fi/tmc-langs-rust/tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe to c:\Users\user\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli\tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe
[2023-08-31 05:57:30:533] [ERROR] An error occurred while downloading TMC-langs:
Error — Request failed: Proxy Authentication Required — Error: Request failed: Proxy Authentication Required
	at c:\Users\user\.vscode\extensions\moocfi.test-my-code-2.1.5\dist\lib.js:2:537006
	at Generator.next (<anonymous>)
	at o (c:\Users\user\.vscode\extensions\moocfi.test-my-code-2.1.5\dist\lib.js:2:536077)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)

To Reproduce
Error appears after downloading the addon/using it for the first time.

Expected behavior
It should automatically detect the proxy set in the windows settings or provide a function to specifiy one.

Desktop (please complete the following information):

  • OS: Windows 10
  • VSCode Version 1.81.1
  • TMC Extension Version 2.1.5

TMC Extension logs

[2023-08-31 05:57:30:437] [INFO] Starting moocfi.test-my-code in "production" mode.
[2023-08-31 05:57:30:437] [INFO] Visual Studio Code version: 1.81.1
[2023-08-31 05:57:30:437] [INFO] moocfi.test-my-code version: 2.1.5
[2023-08-31 05:57:30:437] [INFO] Currently open workspace: undefined
[2023-08-31 05:57:30:437] [INFO] Platform win32 Arch x64
[2023-08-31 05:57:30:437] [INFO] TMC-Langs version: tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe
[2023-08-31 05:57:30:439] [INFO] Downloading TMC-langs from https://download.mooc.fi/tmc-langs-rust/tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe to c:\Users\user\AppData\Roaming\Code\User\globalStorage\moocfi.test-my-code\cli\tmc-langs-cli-x86_64-pc-windows-msvc-0.25.2.exe
[2023-08-31 05:57:30:533] [ERROR] An error occurred while downloading TMC-langs:
Error — Request failed: Proxy Authentication Required — Error: Request failed: Proxy Authentication Required
	at c:\Users\user\.vscode\extensions\moocfi.test-my-code-2.1.5\dist\lib.js:2:537006
	at Generator.next (<anonymous>)
	at o (c:\Users\user\.vscode\extensions\moocfi.test-my-code-2.1.5\dist\lib.js:2:536077)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
@Heliozoa
Copy link
Collaborator

VSCode extensions do not currently support proxies: https://code.visualstudio.com/docs/setup/network#_legacy-proxy-server-support, microsoft/vscode#12588
All the existing workarounds seem to require writing the password in plaintext to an environment variable or something similar to that, which is obviously not great. It doesn't seem like Microsoft is in any hurry to implement a fix either, so there many not be any good solution right now.

I think we could maybe detect that an authenticated proxy is in use and prompt the user for the username and password and then use those details to make requests both from the extension and the langs CLI which is used by the extension, but such a feature would be pretty low priority right now.

@WeiterWeiterFertigstellen
Copy link
Author

@Heliozoa Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants