microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.93k stars 29.52k forks source link

bin/code-server --install-extension hangs two minutes sometimes #234843

Open lutzmad opened 4 days ago

lutzmad commented 4 days ago

Does this issue occur when all extensions are disabled?: Yes/No

Steps to Reproduce:

  1. Switch to folder ~/.vscode-server/bin/65edc4939843c90c34d61f4ce11704f09d3e5cb6
  2. Try to install a extension from a file with .bin/code-server --install-extension ~/ms-python.debugpy-2024.13.2024103001@linux-x64.vsix
  3. The installation hangs two minutes.

Is this a bug or a problem of understanding, based on the way how the vscode-server try to install (some) extensions via the command line.

I installed an extension via command line with bin/code-server --install-extension ~/ms-python.debugpy-2024.13.2024103001@linux-x64.vsix

The command hangs two minutes and try to get access to the marketplace (13.107.42.18), but the code-server can not.

node    142900 was12345   20w      REG     254,9     1488   2367766 /scratch/tmp/.vscode-server/data/logs/20241128T150718/remoteCLI.log
node    142900 was12345   21u     IPv4 230468952      0t0       TCP d100stul0001.d100.intern:38224->13.107.42.18:https (SYN_SENT)

A snipped from the remoteCLI.log

2024-11-28 15:07:18.803 [info] Installing extension: ms-python.debugpy {"isMachineScoped":false,"installPreReleaseVersion":false,"installGivenVersion":true,"installOnlyNewlyAddedFromExtensionPack":false,"isApplicationScoped":false,"profileLocation":{"$mid":1,"fsPath":"/scratch/tmp/.vscode-server/extensions/extensions.json","external":"file:///scratch/tmp/.vscode-server/extensions/extensions.json","path":"/scratch/tmp/.vscode-server/extensions/extensions.json","scheme":"file"},"productVersion":{"version":"1.95.1","date":"2024-10-31T05:14:54.222Z"}}
2024-11-28 15:09:28.769 [error] [network] #1: https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery - error POST connect ETIMEDOUT 13.107.42.18:443
2024-11-28 15:09:28.769 [warning] Cannot install dependencies of extension: ms-python.debugpy connect ETIMEDOUT 13.107.42.18:443
2024-11-28 15:09:29.141 [info] Extracted extension to file:///scratch/tmp/.vscode-server/extensions/ms-python.debugpy-2024.13.2024103001: ms-python.debugpy
2024-11-28 15:09:29.182 [info] Renamed to /scratch/tmp/.vscode-server/extensions/ms-python.debugpy-2024.13.2024103001
2024-11-28 15:09:29.195 [info] Extension installed successfully: ms-python.debugpy file:///scratch/tmp/.vscode-server/extensions/extensions.json

I tried the "--proxy-server" option to give the code-server some help to find a proxy, but the option was ignored, I got the message. Ignoring option 'proxy-server': not supported for server.

Therefore the question, is this a problem of the way how Microsoft create/build the vsix Pakages (ms-python.debugpy or ms-python.python, ms-python.vscode-pylance). Or a problem of the way how the code-server try to install the packages.

From my point of view, the code-server should not connect to the marketplace. The package on the disk should be used only.

Thanks for any suggestion, Lutz

lutzmad commented 3 days ago

Additional information to the dependency check, based on ms-python.debugpy-2024.13.2024112901@linux-x64 file extension.vsixmanifest

A snippet only.

        </Metadata>
        <Installation>
            <InstallationTarget Id="Microsoft.VisualStudio.Code"/>
        </Installation>
        <Dependencies/>
        <Assets>

I can not see any dependency defined.

On the other hand, in the extension/package.json file I find a extension dependency, see snippet.

,"extensionDependencies":["ms-python.python"],

But the "ms-python.python" is already installed, Lutz