vscode: code --install-extension is broken in latest version??
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.87.0
- OS Version: debian - devcontainer based off of mcr.microsoft.com/devcontainers/java:1-11-jdk-bullseye
Steps to Reproduce:
- Create the devcontainer
- After devcontainer creation completion - I usually run a script file to install my extensions list for example
code --install-extension vscjava.vscode-java-pack
Fails with the following error:
root ➜ /workspaces/old-world $ code --install-extension vscjava.vscode-java-pack --verbose --force
{
"type": "extensionManagement",
"install": [
"vscjava.vscode-java-pack"
],
"force": true
}
Installing extensions on Dev Container: Java-8...
Installing extension 'vscjava.vscode-java-pack'...
Error while installing extension vscjava.vscode-java-pack: [object Object]
Failed Installing Extensions: vscjava.vscode-java-pack
Until the latest releases (not sure when it’s been broken) - I could install the extensions this way
- NOTE: via the UI it works
About this issue
- Original URL
- State: open
- Created 4 months ago
- Comments: 18 (8 by maintainers)
Seems like there are proxy issues on the remote server. When installing from the UI, VS Code downloads the extension locally (if it fails on the server) and installs it on the server.
You can also use following setting to always download extensions on the client and install on server.
"remote.downloadExtensionsLocally": true
This used to work, please fix.
Still,
#1 Set in devcontainer settings
Verified that it is configured properly
Attempted to run via terminal:
In Server Logs… STILL
BTW: I also attempted to set the USER config to remote.downloadExtensionsLocally as well - with the same results and logs
As I stated before, this used to work!!
The same issue occurs with the latest code-insiders version
Log from Open View --> Server
NOTE: I have NO Problem with these extensions installing using the UI - Yet there is still a Certificate Error issue - but it gets over it and still installs the extension.
Maybe this is the cause the certificate error - and maybe it is the same reason why when In my devcontainer.json file it fails to install as well.
My workaround until now was to run code --install-extension <extensionId> until now and that was good enough (as described in the initial report) - but now even that doesn’t work.
It could be that our corporate firewall is blocking tls connections to the server with the extensions, however, I don’t see the server request in order to inform IT to open the server for tls connections - We did have to open up ghcr.io for proper feature download to work.
In any case, as I said above my workaround was working until some of the latest versions - and I’d love to find a solution that it gets automatically installed based on the devcontainer.json file 😃