Failure to use code.cmd --install-extension vscjava.vscode-java-test
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.97.2
- OS Version: Windows 111 23H2 Build 22631.4890
Steps to Reproduce:
- Run command code.cmd --install-extension vscjava.vscode-java-test in a cmd.exe prompt
- Getting error message: Installing extensions... Extension 'vscjava.vscode-java-test' not found. Make sure you use the full extension ID, including the publisher, e.g.: ms-dotnettools.csharp Failed Installing Extensions: vscjava.vscode-java-test That ID is correct. It also occurs for any other ID. Where is the log file where we can see the cause for the error.
It seems to work for me. Are you connected to VS Marketplace?
It seems to work for me. Are you connected to VS Marketplace?
Great it works on your machine. That does not help me - but it's still great for you.
Can you please try following and share output
code.cmd --install-extension vscjava.vscode-java-test --verbose
OK. I figured out the reason!
We are using an authenticating proxy server (Kerberos). In the user settings.json we set http.proxy to point to our proxy server, e.g. http.proxy=http://someserver:8080. When using the UI this works perfectly well. The VS Code UI appears to perform proper proxy authentication automatically.
But: when using the command line code --install-extension vscjava.vscode-java-test --verbose I see
TRACE #1: https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery - end POST **407** { 'proxy-authenticate': 'NEGOTIATE, NTLM', 'cache-control': 'no-cache', 'x-xss-protection': '1', connection: 'close', 'content-type': 'text/html; charset=utf-8', 'content-length': '2963', pragma: 'no-cache' }
so proxy authentication is not working.
Bug 1: when the http.proxy setting is set and the proxy server requires authentication this does not work when using the command line option --install-extension
Also: when using PX as local proxy and setting http_proxy=http://127.0.0.1:3128 and https_proxy=http://127.0.0.1:3128 this is NOT being used when using the command line. There is NO output in the px logfile whatsoever. Bug 2: when the http.proxy setting is set and the proxy server requires authentication and the https_proxy and http_proxy are set those do NOT overwrite the http.proyx setting as documented!
See the attached log files
1 -http-proxy settting set and PX active.log 2- http-proxy setting NOT set and PX active.log