-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
code --install-extension <extension.name> is broken in latest version?? #206732
Comments
Where do you run this command? Can you please give more details? |
The main reason for this is that when adding extensions in a devcontainer (based off of a base devcontainer) - the extensions were not being loaded when configured in the devcontainer.json customizations.vscode.extensions[] setting. So I created a script to call code --install-extension - to be called manually for now once the devcontainer is up in a teminal my script to install the extensions I wanted was in a bash file add_extensions.sh
I have a list of extensions in a extensions.txt file:
once the devcontainer is attached I can verify that code I've verified that code is installed and even get the list of installed extensions (which I installed via UI):
however, to manually install with the code command (in the same integrated terminal) , it fails as follows:
|
This is in the terminal in VS Code remote window that is connected to dev container? |
Correct - opened in integrated terminal - after devcontainer is up |
I tried and it worked for me. Can you please try insider and see if you can repro? Also please share following log where you repro
|
I have the same issue with the same setup. It used to work. I have the following Error Messages: |
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 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 :) |
Can you please enable log level to trace and share the window log?
|
After setting the Developer: Set Log Level --> Trace I recreated my devcontainer - without cache Executed on code-Insiders the following in terminal
Got the following in the Server Log:
As mentioned above, I can install via the UI and these are the logs for the same vscjava.vscode-java-pack extension.
|
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.
|
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!! |
Also, like I mentioned before, we did in the past have to specifically open the ghcr.io domain in our firewall to load features server in order to be able to build devcontainers. What is the server that is used to retrieve the extensions? Maybe that is all we need to do to solve this issue???
|
Is there any update? Or maybe a workaround to install a set of extensions easily in a devcontainer? |
the list of hosts used by the application is documented at https://code.visualstudio.com/docs/setup/network#_common-hostnames
Looks like an unknown CA is sent by your proxy server, you can set additional CA certs to be respected by our server via the following env variable when starting the container https://nodejs.org/docs/latest/api/all.html#all_cli_node_extra_ca_certsfile |
@sandy081 based on #206732 (comment), looks the server network stack is used to download even with the setting |
Which certificate should I use here? |
|
This used to work, please fix. |
I have the same issue. Extensions will install from the GUI on WSL, but if using the terminal (integrated or standalone wsl), I get the issuer certificate error. What weird is if I use the WSL terminal and set NODE_EXTRA_CA_CERTS to the path of my enterprise cert, it will install the extensions fine. However, if I use the integrated terminal in VSCODE it will throw the error regardless if NODE_EXTRA_CA_CERTS is set or not. Also the errors are slightly different when using WSL's terminal vs the Code Integrated Terminal: Code terminal
WSL terminal
|
More details: https://code.visualstudio.com/docs/setup/network#_legacy-proxy-server-support Specific GitHub issues tracking the feature improvements to make this work properly: |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
code --install-extension vscjava.vscode-java-pack
Fails with the following error:
Until the latest releases (not sure when it's been broken) - I could install the extensions this way
The text was updated successfully, but these errors were encountered: