vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Devcontainer stuck installing extensions

Open hanikesn opened this issue 1 year ago • 16 comments

  • VSCode Version: 1.88.1
  • Local OS Version: arch, 6.8.7-arch1-1 and on with Docker on Mac
  • Remote OS Version: -
  • Remote Extension/Connection Type: Containers
  • Using docker-composer and a multi-root workspace
  • Seems to work reliably in codespaces
  • 50:50 success rate locally

Steps to Reproduce:

  1. Rebuild devcontainer
  2. Extension tab keeps spinning
  3. /root/.vscode-server/bin/e170252f762678dec6ca2cc69aba1570769a5d39/bin/code-server --log trace --force-disable-user-env --server-data-dir /root/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /root/.vscode-server/data/Machine/.connection-token-e170252f762678dec6ca2cc69aba1570769a5d39 --extensions-download-dir /root/.vscode-server/extensi onsCache --install-extension charliermarsh.ruff ... --start-server --disable-websocket-compression --skip-requirements-check freezes

See:

  • https://github.com/microsoft/vscode-remote-release/issues/6755

hanikesn avatar Apr 24 '24 09:04 hanikesn

I'm having the same problem but different log. I think this may be related to GitHub outage https://www.githubstatus.com/incidents/7txcg0j03kkg: Extension host log:

2024-04-24 14:30:02.397 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2024-04-24 14:30:26.310 [info] Extension host terminating: renderer closed the MessagePort
2024-04-24 14:30:26.337 [error] Canceled: Canceled
	at Object.C [as $6] (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:10:1032)
	at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:147:2349
	at Array.forEach (<anonymous>)
	at s.dispose (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:147:2287)
	at w.terminate (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:156:8052)
	at o.terminate (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:160:1513)
	at t (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:173:9949)
	at MessagePortMain.<anonymous> (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:173:6374)
	at MessagePortMain.emit (node:events:514:28)
	at Object.emit (node:electron/js2c/utility_init:2:2285) remote-containers.rebuildContainerNoCache {"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"}

cedric-fauth avatar Apr 24 '24 12:04 cedric-fauth

I've been encountering this issue since at least last Friday

hanikesn avatar Apr 24 '24 13:04 hanikesn

Thanks for opening.

cc @sandy081 I wonder if this is related to issues like https://github.com/microsoft/vscode-remote-release/issues/9628?

bamurtaugh avatar Apr 24 '24 22:04 bamurtaugh

It seems like a different issue, I tried both workarounds:

  • killall vsce-sign; vsce-sign: no process found
  • As a workaround please set "extensions.verifySignature": false setting under customizations.vscode.settings in devcontainer.json

And neither fixed the issue after rebuilding the devcontainer

hanikesn avatar Apr 25 '24 08:04 hanikesn

Can you please share following log while you can reproduce the issue

  • F1 > Open View... > Server

sandy081 avatar Apr 25 '24 09:04 sandy081

Sure, here's the server log with log level trace: server.log

hanikesn avatar Apr 25 '24 11:04 hanikesn

I suspect there are network connection issues on the dev container - I do not see any installing log statement after this

2024-04-25 11:15:23.910 [info] Getting Manifest... eamodio.gitlens

Can you please enable following setting"remote.downloadExtensionsLocally": true and retry?

sandy081 avatar Apr 25 '24 12:04 sandy081

So I had a few successful runs again, but after clearing the vscode volume, it got stuck again:

In general networking works fine in the container, but let me know if there's any specific routes or hosts I should test with.

hanikesn avatar Apr 25 '24 13:04 hanikesn

@hanikesn I suspect this is related to signing verification. Please set following setting in your devcontainer.json file under customizations.vscode.settingsand rebuild the container

"extensions.verifySignature": false

sandy081 avatar Apr 25 '24 13:04 sandy081

@sandy081 I had already tried earlier here: https://github.com/microsoft/vscode-remote-release/issues/9822#issuecomment-2076664274 but I could try again with the remote.downloadExtensionsLocally: true

hanikesn avatar Apr 25 '24 13:04 hanikesn

I did leave the window open for some time and it eventually installed the extensions after about 13mins:

2024-04-25 13:03:13.247 [info] Getting Manifest... github.copilot
2024-04-25 13:03:13.247 [info] Getting Manifest... esbenp.prettier-vscode
2024-04-25 13:03:13.247 [info] Getting Manifest... charliermarsh.ruff
2024-04-25 13:03:13.247 [info] Getting Manifest... github.vscode-github-actions
2024-04-25 13:03:13.247 [info] Getting Manifest... mohsen1.prettify-json
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-azuretools.vscode-dapr
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-python.mypy-type-checker
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-python.debugpy
2024-04-25 13:03:13.247 [info] Getting Manifest... golang.go
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-python.python
2024-04-25 13:03:13.247 [info] Getting Manifest... orta.vscode-jest
2024-04-25 13:03:13.247 [info] Getting Manifest... eamodio.gitlens
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-azuretools.vscode-docker
2024-04-25 13:03:13.247 [info] Getting Manifest... ryanluker.vscode-coverage-gutters
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-python.vscode-pylance
2024-04-25 13:03:13.247 [info] Getting Manifest... stripe.vscode-stripe
2024-04-25 13:03:13.247 [info] Getting Manifest... ms-vscode.makefile-tools
2024-04-25 13:03:13.247 [info] Getting Manifest... zxh404.vscode-proto3
2024-04-25 13:03:14.037 [debug] Terminal profile not validated zsh ["zsh"]
2024-04-25 13:03:14.037 [debug] Terminal profile not validated fish ["fish"]
2024-04-25 13:03:14.037 [debug] Terminal profile not validated tmux ["tmux"]
2024-04-25 13:03:14.037 [debug] Terminal profile not validated pwsh ["pwsh"]
2024-04-25 13:06:15.231 [debug] Terminal profile not validated zsh ["zsh"]
2024-04-25 13:06:15.232 [debug] Terminal profile not validated fish ["fish"]
2024-04-25 13:06:15.232 [debug] Terminal profile not validated tmux ["tmux"]
2024-04-25 13:06:15.232 [debug] Terminal profile not validated pwsh ["pwsh"]
2024-04-25 13:14:14.096 [info] Log level changed to info
2024-04-25 13:19:38.405 [info] Installing extension: esbenp.prettier-vscode
2024-04-25 13:19:38.405 [info] Installing extension: github.copilot
2024-04-25 13:19:38.405 [info] Installing extension: github.vscode-github-actions
2024-04-25 13:19:38.405 [info] Installing extension: charliermarsh.ruff
2024-04-25 13:19:38.405 [info] Installing extension: mohsen1.prettify-json
2024-04-25 13:19:38.405 [info] Installing extension: ms-python.debugpy
2024-04-25 13:19:38.406 [info] Installing extension: ms-python.mypy-type-checker
2024-04-25 13:19:38.406 [info] Installing extension: ms-azuretools.vscode-dapr
2024-04-25 13:19:38.406 [info] Installing extension: ms-python.python
2024-04-25 13:19:38.406 [info] Installing extension: orta.vscode-jest
2024-04-25 13:19:38.406 [info] Installing extension: stripe.vscode-stripe
2024-04-25 13:19:38.406 [info] Installing extension: ryanluker.vscode-coverage-gutters
2024-04-25 13:19:38.406 [info] Installing extension: zxh404.vscode-proto3
2024-04-25 13:19:38.407 [info] Installing extension: golang.go
2024-04-25 13:19:38.407 [info] Installing extension: ms-azuretools.vscode-docker
2024-04-25 13:19:38.407 [info] Installing extension: eamodio.gitlens
2024-04-25 13:19:38.407 [info] Installing extension: ms-vscode.makefile-tools
2024-04-25 13:19:38.407 [info] Installing extension: ms-python.vscode-pylance
2024-04-25 13:19:39.337 [info] Getting Manifest... ms-dotnettools.vscode-dotnet-runtime
2024-04-25 13:19:39.337 [info] Getting Manifest... ms-vscode.live-server
2024-04-25 13:19:39.337 [info] Getting Manifest... ms-python.python
2024-04-25 13:19:39.451 [info] Getting Manifest... ms-python.python
2024-04-25 13:19:39.458 [info] Getting Manifest... ms-python.python
2024-04-25 13:19:39.472 [info] Installing extension: ms-vscode.live-server
2024-04-25 13:19:39.484 [info] Installing extension: ms-dotnettools.vscode-dotnet-runtime
2024-04-25 13:19:39.513 [info] Getting Manifest... ms-python.vscode-pylance
2024-04-25 13:19:39.534 [info] Getting Manifest... ms-python.python
2024-04-25 13:19:39.557 [info] Getting Manifest... github.copilot-chat
2024-04-25 13:19:39.708 [info] Getting Manifest... ms-python.debugpy
2024-04-25 13:19:39.713 [info] Installing extension: github.copilot-chat
2024-04-25 13:19:40.110 [info] Getting Manifest... ms-python.debugpy
2024-04-25 13:19:40.240 [info] Getting Manifest... ms-python.vscode-pylance
2024-04-25 13:19:40.254 [info] Getting Manifest... ms-python.vscode-pylance
2024-04-25 13:19:40.408 [info] Getting Manifest... ms-python.debugpy
2024-04-25 13:19:40.716 [info] Getting Manifest... ms-python.vscode-pylance
2024-04-25 13:19:40.897 [info] Getting Manifest... ms-python.debugpy
2024-04-25 13:19:42.993 [info] Extension signature is verified: ms-python.debugpy
2024-04-25 13:19:42.996 [info] Extension signature is verified: ms-vscode.live-server
2024-04-25 13:19:43.008 [info] Extension signature is verified: mohsen1.prettify-json
2024-04-25 13:19:43.009 [info] Extension signature is verified: esbenp.prettier-vscode
2024-04-25 13:19:43.030 [info] Extension signature is verified: charliermarsh.ruff
2024-04-25 13:19:43.037 [info] Extension signature is verified: orta.vscode-jest
...

hanikesn avatar Apr 25 '24 13:04 hanikesn

@hanikesn It seems the extensions are asked to install multiple times. Can you please let us know how you are installing the extensions?

sandy081 avatar Apr 29 '24 15:04 sandy081

@hanikesn It seems the extensions are asked to install multiple times. Can you please let us know how you are installing the extensions?

Via customizations.vscode.extensions in .devcontainer.json

hanikesn avatar Apr 29 '24 15:04 hanikesn

Can you please enable the log level to trace and share the complete server log.

sandy081 avatar Apr 29 '24 15:04 sandy081

Can you please enable the log level to trace and share the complete server log.

@sandy081 I uploaded one here https://github.com/microsoft/vscode-remote-release/issues/9822#issuecomment-2076949849. Do you need another one with specific settings?

hanikesn avatar Apr 29 '24 16:04 hanikesn

Here is what I would request you to do.

  • Download and Use Latest Insiders - https://code.visualstudio.com/insiders
  • Add "extensions.verifySignature": false setting under customizations.vscode.settings in devcontainer.json.
  • Add only one extension to install in customizations.vscode.extensions
  • Please share the file for double check.
  • Rebuild the container and check whether the extension was installed or not.
  • Share the server log.

sandy081 avatar May 08 '24 13:05 sandy081

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

vscodenpa avatar May 16 '24 12:05 vscodenpa

In case anyone comes across this issue, the only solution that worked for me was to completely reset VSCode:

rm -rfv "$HOME/.vscode"
rm -rfv "$HOME/Library/Application Support/Code"
rm -rfv "$HOME/Library/Caches/com.microsoft.VSCode"
rm -rfv "$HOME/Library/Saved Application State/com.microsoft.VSCode.savedState"

(or whatever the equivalent is on your OS)

jmesterh avatar Jun 13 '24 22:06 jmesterh