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

extensions do not auto install when defined using ssh with devcontainer (works without ssh)

Open ryanmerolle opened this issue 2 years ago • 4 comments

  • VSCode Version: 1.71.1
  • Local OS Version: Windows 10 19044.1889
  • SSH Remote OS Version: Red Hat Enterprise Linux
  • Devcontainer Remote container: python:3.9.14-bullseye
  • Remote Extension/Connection Type: SSH & Container
  • Logs:
[43 ms] Remote-Containers 0.251.0 in VS Code 1.71.1 (e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb).
[43 ms] Start: Resolving Remote
[57 ms] Start: Run: ssh -F C:\Users\ryan\.ssh\config exdl237-ny5-1 /bin/sh
[73 ms] Start: Run in host: id -un
[453 ms] ryan
[453 ms] 
[453 ms] Start: Run in host: cat /etc/passwd
[457 ms] Start: Run in host: echo ~
[459 ms] /home/ryan
[459 ms] 
[460 ms] Start: Run in host: test -x '/home/ryan/.vscode-remote-containers/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node'
[463 ms] 
[463 ms] 
[464 ms] Start: Run in host: test -f '/home/ryan/.vscode-remote-containers/dist/vscode-remote-containers-server-0.251.0.js'
[466 ms] 
[466 ms] 
[468 ms] userEnvProbe: loginInteractiveShell (default)
[469 ms] userEnvProbe shell: /bin/sh
[573 ms] userEnvProbe PATHs:
Probe:     '/home/ryan/.local/bin:/home/ryan/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin'
Container: None
[576 ms] Setting up container for folder or workspace: /home/ryan/repos/docker-net_dev
[576 ms] Host: ssh://exdl237-ny5-1
[577 ms] Start: Check Docker is running
[578 ms] Start: Run in Host: docker version --format {{.Server.APIVersion}}
[614 ms] Server API version: 1.41
[614 ms] Start: Run in Host: docker volume ls -q
[642 ms] Start: Run in Host: docker volume create vscode
[682 ms] Start: Run in Host: docker ps -q -a --filter label=vsch.local.folder=/home/ryan/repos/docker-net_dev --filter label=vsch.quality=stable
[710 ms] Start: Run in Host: docker ps -q -a --filter label=devcontainer.local_folder=/home/ryan/repos/docker-net_dev
[744 ms] Start: Run in Host: /home/ryan/.vscode-remote-containers/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node /home/ryan/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js up --workspace-folder /home/ryan/repos/docker-net_dev --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/ryan/repos/docker-net_dev --log-level debug --log-format json --config /home/ryan/repos/docker-net_dev/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[855 ms] remote-containers 0.251.0.
[855 ms] Start: Run: docker buildx version
[924 ms] Start: Resolving Remote
[930 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/ryan/repos/docker-net_dev
[958 ms] local container features stored at: /home/ryan/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/node_modules/vscode-dev-containers/container-features
[959 ms] Start: Run: tar --no-same-owner -x -f -
[972 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[974 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[975 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[978 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[980 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[981 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[982 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[984 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[987 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[988 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[989 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[990 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[990 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[992 ms] tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

[993 ms] Start: Run: docker inspect --type image docker-net_dev:2.0.0
[1023 ms] Start: Run: docker build -f /tmp/vsch-ryan/updateUID.Dockerfile-0.251.0 -t vsc-docker-net_dev-f6c90ff2b13dc77cd26e574d3ba007ce-uid --build-arg BASE_IMAGE=docker-net_dev:2.0.0 --build-arg REMOTE_USER=netdev --build-arg NEW_UID=10001 --build-arg NEW_GID=10002 --build-arg IMAGE_USER=root /tmp/vsch-ryan
Sending build context to Docker daemon  2.069MB
Step 1/10 : ARG BASE_IMAGE
Step 2/10 : FROM $BASE_IMAGE
 ---> d197fd7c47fe
Step 3/10 : USER root
 ---> Using cache
 ---> e8918bbbe0bd
Step 4/10 : ARG REMOTE_USER
 ---> Using cache
 ---> 1aef98f71b1e
Step 5/10 : ARG NEW_UID
 ---> Using cache
 ---> a17d1dc7cded
Step 6/10 : ARG NEW_GID
 ---> Using cache
 ---> 9c393eae6ada
Step 7/10 : SHELL ["/bin/sh", "-c"]
 ---> Using cache
 ---> 429b201f5b26
Step 8/10 : RUN eval $(sed -n "s/${REMOTE_USER}:[^:]*:\([^:]*\):\([^:]*\):[^:]*:\([^:]*\).*/OLD_UID=\1;OLD_GID=\2;HOME_FOLDER=\3/p" /etc/passwd);    eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_UID}:.*/EXISTING_USER=\1/p" /etc/passwd);        eval $(sed -n "s/\([^:]*\):[^:]*:${NEW_GID}:.*/EXISTING_GROUP=\1/p" /etc/group);     if [ -z "$OLD_UID" ]; then              echo "Remote user not found in /etc/passwd ($REMOTE_USER).";         elif [ "$OLD_UID" = "$NEW_UID" -a "$OLD_GID" = "$NEW_GID" ]; then               echo "UIDs and GIDs are the same ($NEW_UID:$NEW_GID).";   elif [ "$OLD_UID" != "$NEW_UID" -a -n "$EXISTING_USER" ]; then          echo "User with UID exists ($EXISTING_USER=$NEW_UID).";      elif [ "$OLD_GID" != "$NEW_GID" -a -n "$EXISTING_GROUP" ]; then                 echo "Group with GID exists ($EXISTING_GROUP=$NEW_GID).";    else            echo "Updating UID:GID from $OLD_UID:$OLD_GID to $NEW_UID:$NEW_GID.";                sed -i -e "s/\(${REMOTE_USER}:[^:]*:\)[^:]*:[^:]*/\1${NEW_UID}:${NEW_GID}/" /etc/passwd;                if [ "$OLD_GID" != "$NEW_GID" ]; then                        sed -i -e "s/\([^:]*:[^:]*:\)${OLD_GID}:/\1${NEW_GID}:/" /etc/group;            fi; chown -R $NEW_UID:$NEW_GID $HOME_FOLDER;         fi;
 ---> Running in a9ac1332e057
Updating UID:GID from 1000:1000 to 10001:10002.
Removing intermediate container a9ac1332e057
 ---> 2a312b748ec5
Step 9/10 : ARG IMAGE_USER
 ---> Running in 80840f37f708
Removing intermediate container 80840f37f708
 ---> 24307e8fe9b0
Step 10/10 : USER $IMAGE_USER
 ---> Running in 551d9117608b
Removing intermediate container 551d9117608b
 ---> 8e2cfc264bcf
Successfully built 8e2cfc264bcf
Successfully tagged vsc-docker-net_dev-f6c90ff2b13dc77cd26e574d3ba007ce-uid:latest
[593917 ms] Start: Run: docker -v
[593946 ms] Start: Run: docker events --format {{json .}} --filter event=start
[593948 ms] Start: Starting container
[593948 ms] Start: Run: docker run --sig-proxy=false -a STDOUT -a STDERR --mount source=/home/ryan/repos/docker-net_dev/..,target=/home/netdev/repos,type=bind,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=/home/ryan/repos/docker-net_dev --name ryan_devcontainer --env CONTAINER_OWNER=ryan -v ryan_devcontainer-extensions:/root/.vscode-server/extensions -v ryan_devcontainer-commandhistory:/commandhistory -v /var/run/docker.sock:/var/run/docker.sock -v /home/ryan/.ssh:/home/netdev/.ssh -v /home/ryan/.gitconfig:/home/netdev/.gitconfig --entrypoint /bin/sh vsc-docker-net_dev-f6c90ff2b13dc77cd26e574d3ba007ce-uid -c echo Container started
Container started
[594319 ms] Start: Run: docker ps -q -a --filter label=devcontainer.local_folder=/home/ryan/repos/docker-net_dev
[594347 ms] Start: Run: docker inspect --type container 109188547bdb
[594375 ms] Start: Inspecting container
[594375 ms] Start: Run: docker inspect --type container 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e
[594403 ms] Start: Run in container: /bin/sh
[594406 ms] Start: Run in container: uname -m
[594489 ms] x86_64
[594489 ms] 
[594489 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[594490 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[594490 ms] 
[594491 ms] Start: Run in container: cat /etc/passwd
[594492 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcEnvironmentMarker'
[594493 ms] 
[594493 ms] 
[594493 ms] Exit code 1
[594493 ms] Start: Run in container: /bin/sh
[594495 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcEnvironmentMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcEnvironmentMarker' ; } 2> /dev/null
[594587 ms] 
[594587 ms] 
[594588 ms] Start: Run in container: cat >> /etc/environment <<'etcEnvrionmentEOF'
[594589 ms] 
[594589 ms] 
[594589 ms] Start: Run in container: test -f '/var/devcontainer/.patchEtcProfileMarker'
[594589 ms] 
[594589 ms] 
[594589 ms] Exit code 1
[594589 ms] Start: Run in container: test ! -f '/var/devcontainer/.patchEtcProfileMarker' && set -o noclobber && mkdir -p '/var/devcontainer' && { > '/var/devcontainer/.patchEtcProfileMarker' ; } 2> /dev/null
[594591 ms] 
[594591 ms] 
[594591 ms] Start: Run in container: sed -i -E 's/((^|\s)PATH=)([^\$]*)$/\1${PATH:-\3}/g' /etc/profile || true
[594593 ms] 
[594593 ms] 
[594608 ms] Start: Run in Host: docker inspect --type container 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e
[594643 ms] Start: Run in Host: /home/ryan/.vscode-remote-containers/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node /home/ryan/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/ryan/repos/docker-net_dev --container-id 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e --log-level debug --log-format json --config /home/ryan/repos/docker-net_dev/.devcontainer/devcontainer.json --mount-workspace-git-root true
[594761 ms] remote-containers 0.251.0.
[594761 ms] Start: Run: docker inspect --type container 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e
[594808 ms] Start: Inspecting container
[594808 ms] Start: Run in Host: docker inspect --type container 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e
[594849 ms] Start: Run in Host: docker exec -i -u netdev -e VSCODE_REMOTE_CONTAINERS_SESSION=9985f730-1679-448d-a021-1d51015f95571663123594910 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /bin/sh
[594853 ms] Start: Run in container: uname -m
[594947 ms] x86_64
[594948 ms] 
[594948 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[594951 ms] PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[594951 ms] 
[594951 ms] Start: Run in container: cat /etc/passwd
[594955 ms] Start: Updating configuration state
[594961 ms] Start: Setup shutdown monitor
[594962 ms] Forking shutdown monitor: c:\Users\ryan\.vscode\extensions\ms-vscode-remote.remote-containers-0.251.0\dist\shutdown\shutdownMonitorProcess \\.\pipe\vscode-remote-containers-dd85d22ae949a5363b3b7da92bc0c26ff1f55d99-sock singleContainer Debug c:\Users\ryan\AppData\Roaming\Code\logs\20220913T224425\exthost1\ms-vscode-remote.remote-containers 1663123596020
[594971 ms] Start: Run in container: test -d /home/netdev/.vscode-server
[594974 ms] 
[594974 ms] 
[594975 ms] Start: Run in container: test ! -f '/home/netdev/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/home/netdev/.vscode-server/data/Machine' && { > '/home/netdev/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[594981 ms] 
[594981 ms] 
[594988 ms] Start: Run in Host: /home/ryan/.vscode-remote-containers/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node /home/ryan/.vscode-remote-containers/dist/dev-containers-cli-0.251.0/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/ryan/repos/docker-net_dev --container-id 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e --log-level debug --log-format json --config /home/ryan/repos/docker-net_dev/.devcontainer/devcontainer.json --include-features-configuration --mount-workspace-git-root true
[595105 ms] remote-containers 0.251.0.
[595105 ms] Start: Run: docker inspect --type container 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e
[595154 ms] Start: Run in container: mkdir -p '/home/netdev/.vscode-server/data/Machine' && cat >'/home/netdev/.vscode-server/data/Machine/settings.json' <<'settingsJSON'
[595161 ms] 
[595161 ms] 
[595161 ms] Start: Run in container: test -d /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb
[595164 ms] 
[595164 ms] 
[595164 ms] Exit code 1
[595165 ms] Start: Run in container: test -d /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb
[595169 ms] 
[595169 ms] 
[595169 ms] Exit code 1
[595169 ms] Installing VS Code Server for commit e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb
[595169 ms] Start: Run in Host: docker exec -i -u root 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /bin/sh
[595174 ms] Start: Installing VS Code Server
[595174 ms] Start: Run in container: mkdir -p /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb_1663124191194
[595264 ms] 
[595265 ms] 
[595309 ms] Start: Run in container: (dd iflag=fullblock bs=8192 count=7124 2>/dev/null; dd iflag=fullblock bs=5285 count=1 2>/dev/null) | tar --no-same-owner -xz -C /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb_1663124191194
[600875 ms] 
[600876 ms] 
[600876 ms] Start: Run in container: mv -n /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb_1663124191194/* /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb && rmdir /vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb_1663124191194
[600880 ms] 
[600880 ms] 
[600880 ms] Start: Run in container: mkdir -p '/home/netdev/.vscode-server/bin' && ln -snf '/vscode/vscode-server/bin/linux-x64/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb' '/home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb'
[600884 ms] 
[600885 ms] 
[600885 ms] Start: Run in container: cd '/vscode/vscode-server/bin/linux-x64' && ls -t | tail -n +10 | xargs rm -rf
[600885 ms] Start: Launching Remote-Containers helper.
[600885 ms] ssh-agent: SSH_AUTH_SOCK in container (/tmp/vscode-ssh-auth-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.sock) forwarded to local host (\\.\pipe\openssh-ssh-agent).
[600885 ms] Start: Run in Host: gpgconf --list-dir agent-extra-socket
[600897 ms] 
[600898 ms] 
[600901 ms] /run/user/10001/gnupg/S.gpg-agent.extra
[600901 ms] 
[600901 ms] Start: Run in container: gpgconf --list-dir agent-socket
[600904 ms] /home/netdev/.gnupg/S.gpg-agent
[600904 ms] 
[600905 ms] Start: Run in container: gpgconf --list-dir homedir
[600908 ms] /home/netdev/.gnupg
[600908 ms] 
[600908 ms] Start: Run in container: ls '/home/netdev/.gnupg/private-keys-v1.d' 2>/dev/null
[600911 ms] 
[600911 ms] 
[600911 ms] Exit code 2
[600911 ms] Start: Run in container: mkdir -p -m 700 '/home/netdev/.gnupg'
[600912 ms] Start: Run in Host: docker exec -i -u netdev 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /bin/sh
[600912 ms] userEnvProbe: loginInteractiveShell (default)
[600913 ms] userEnvProbe shell: /usr/bin/zsh
[600922 ms] Start: Run in container: echo ~
[600923 ms] 
[600923 ms] 
[600924 ms] Start: Run in Host: gpgconf --list-dir homedir
[600929 ms] Start: Run in container: # Test for /home/netdev/.ssh/known_hosts and ssh
[600932 ms] /home/ryan/.gnupg
[600932 ms] 
[600932 ms] /home/netdev/.ssh/known_hosts exists
[600932 ms] 
[600932 ms] Exit code 1
[600932 ms] Start: Run in container: gpgconf --list-dir homedir
[600932 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --system --replace-all credential.helper '!f() { /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node /tmp/vscode-remote-containers-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js $*; }; f' || true
[600935 ms] /home/netdev/.gnupg
[600935 ms] 
[600936 ms] 
[600936 ms] 
[600936 ms] Start: Run in container: for pid in `cd /proc && ls -d [0-9]*`; do { echo $pid ; readlink /proc/$pid/cwd ; readlink /proc/$pid/ns/mnt ; cat /proc/$pid/stat | tr "
[600960 ms] Start: Run in Host: gpg-connect-agent updatestartuptty /bye
[600966 ms] Start: Run in container: cat '/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb' 2>/dev/null || (umask 377 && echo '61d9ef21-b9ad-4110-8b0d-db184e888085' >'/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb-79063f27-22d7-4ec8-837f-83acc019f23b' && mv -n '/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb-79063f27-22d7-4ec8-837f-83acc019f23b' '/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb' && rm -f '/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb-79063f27-22d7-4ec8-837f-83acc019f23b' && cat '/home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb')
[600972 ms] 61d9ef21-b9ad-4110-8b0d-db184e888085
[600972 ms] 
[600973 ms] Start: Starting VS Code Server
[600973 ms] Start: Preparing Extensions
[600973 ms] Start: Run in container: test ! -f '/home/netdev/.vscode-server/data/Machine/.installExtensionsMarker' && set -o noclobber && mkdir -p '/home/netdev/.vscode-server/data/Machine' && { > '/home/netdev/.vscode-server/data/Machine/.installExtensionsMarker' ; } 2> /dev/null
[600976 ms] 
[600976 ms] 
[600978 ms] Extensions cache, install extensions: DavidAnson.vscode-markdownlint, GSGBen.fortigate-fortios-syntax, GitLab.gitlab-workflow, GrapeCity.gc-excelviewer, Tyriar.sort-lines, WyattFerguson.jinja2-snippet-kit, aaron-bond.better-comments, aristapublisher.eos, bbenoist.vagrant, christian-kohler.path-intellisense, codezombiech.gitignore, csholmq.excel-to-markdown-table, darkriszty.markdown-table-prettify, dzgmelody.vscode-changelog-snippets, esbenp.prettier-vscode, exiasr.hadolint, hashicorp.terraform, jamiewoodio.cisco, jithurjacob.nbpreviewer, mblode.pretty-formatter, mechatroner.rainbow-csv, moshfeu.compare-folders, ms-azuretools.vscode-docker, ms-python.python, ms-python.vscode-pylance, ms-toolsai.jupyter, mtxr.sqltools, nhoizey.gremlins, oderwat.indent-rainbow, petli-full.json-to-yaml-and-more, rangav.vscode-thunder-client, redhat.ansible, redhat.vscode-yaml, samuelcolvin.jinjahtml, streetsidesoftware.code-spell-checker, timonwong.shellcheck, wmaurer.change-case, yzhang.markdown-all-in-one
[600978 ms] Start: Run in container: test -d /home/netdev/.vscode-server/extensionsCache && ls /home/netdev/.vscode-server/extensionsCache || true
[600980 ms] 
[600981 ms] 
[600981 ms] Start: Run in container: test -d /vscode/vscode-server/extensionsCache && ls /vscode/vscode-server/extensionsCache || true
[600983 ms] 
[600983 ms] 
[600983 ms] Extensions cache, link in container: None
[600983 ms] Start: Run in Host: docker exec -i -u netdev -e SHELL=/usr/bin/zsh -e VSCODE_AGENT_FOLDER=/home/netdev/.vscode-server -w /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/bin/code-server --log debug --force-disable-user-env --server-data-dir /home/netdev/.vscode-server --telemetry-level off --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/netdev/.vscode-server/data/Machine/.connection-token-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb --extensions-download-dir /home/netdev/.vscode-server/extensionsCache --install-extension DavidAnson.vscode-markdownlint --install-extension GSGBen.fortigate-fortios-syntax --install-extension GitLab.gitlab-workflow --install-extension GrapeCity.gc-excelviewer --install-extension Tyriar.sort-lines --install-extension WyattFerguson.jinja2-snippet-kit --install-extension aaron-bond.better-comments --install-extension aristapublisher.eos --install-extension bbenoist.vagrant --install-extension christian-kohler.path-intellisense --install-extension codezombiech.gitignore --install-extension csholmq.excel-to-markdown-table --install-extension darkriszty.markdown-table-prettify --install-extension dzgmelody.vscode-changelog-snippets --install-extension esbenp.prettier-vscode --install-extension exiasr.hadolint --install-extension hashicorp.terraform --install-extension jamiewoodio.cisco --install-extension jithurjacob.nbpreviewer --install-extension mblode.pretty-formatter --install-extension mechatroner.rainbow-csv --install-extension moshfeu.compare-folders --install-extension ms-azuretools.vscode-docker --install-extension ms-python.python --install-extension ms-python.vscode-pylance --install-extension ms-toolsai.jupyter --install-extension mtxr.sqltools --install-extension nhoizey.gremlins --install-extension oderwat.indent-rainbow --install-extension petli-full.json-to-yaml-and-more --install-extension rangav.vscode-thunder-client --install-extension redhat.ansible --install-extension redhat.vscode-yaml --install-extension samuelcolvin.jinjahtml --install-extension streetsidesoftware.code-spell-checker --install-extension timonwong.shellcheck --install-extension wmaurer.change-case --install-extension yzhang.markdown-all-in-one --start-server 
[601024 ms] /home/netdev
[601024 ms] 
[601025 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js' >/tmp/vscode-remote-containers-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js
[601028 ms] 
[601028 ms] 
[601028 ms] Start: Run in container: cat <<'EOF-/tmp/vscode-remote-containers-server-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js' >/tmp/vscode-remote-containers-server-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js_1663124197048
[601036 ms] 
[601036 ms] 
[601146 ms] *
* Visual Studio Code Server
*
* By using the software, you agree to
* the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
* the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
*
[601151 ms] Server bound to 127.0.0.1:43857 (IPv4)
Extension host agent listening on 43857

[601151 ms] Start: Run in container: echo 43857 >'/home/netdev/.vscode-server/data/Machine/.devport-e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb'
[601153 ms] 
[601153 ms] 
[601153 ms] Port forwarding for container port 43857 starts listening on local port.
[601155 ms] Port forwarding local port 43857 to container port 43857
[601164 ms] Start: Run in container: # Test for /home/netdev/.gitconfig and git
[601166 ms] /home/netdev/.gitconfig exists
[601166 ms] 
[601166 ms] Exit code 1
[601175 ms] Start: Run in container: command -v git >/dev/null 2>&1 && git config --global --replace-all credential.helper '!f() { /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node /tmp/vscode-remote-containers-0e3b3496cb6d62a6a0a691008e6ccc78373533f3.js $*; }; f' || true
[601178 ms] 
[601178 ms] error: could not write config file /home/netdev/.gitconfig: Device or resource busy
[601324 ms] Installing extensions...
[601326 ms] [02:56:37] Extension host agent started.
[601372 ms] [02:56:37] ComputeTargetPlatform: linux-x64
[601548 ms] userEnvProbe PATHs:
Probe:     '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/netdev/.local/bin:/home/netdev/.npm-global/bin://home/netdev/.local/bin:/home/netdev/.local/bin:/home/netdev/.npm-global/bin'
Container: '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/netdev/.local/bin:/home/netdev/.npm-global/bin'
[601556 ms] Port forwarding connection from 64411 > 43857 > 43857 in the container.
[601556 ms] Start: Run in Host: docker exec -i -u netdev -e VSCODE_REMOTE_CONTAINERS_SESSION=9985f730-1679-448d-a021-1d51015f95571663123594910 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node -e 
[601695 ms] Port forwarding 64411 > 43857 > 43857 stderr: Connection established
[601711 ms] Port forwarding connection from 64412 > 43857 > 43857 in the container.
[601711 ms] Start: Run in Host: docker exec -i -u netdev -e VSCODE_REMOTE_CONTAINERS_SESSION=9985f730-1679-448d-a021-1d51015f95571663123594910 109188547bdb5d450c5d36365b6a5d7eddba48e59763688da18bbce839885c5e /home/netdev/.vscode-server/bin/e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb/node -e 
[601732 ms] [02:56:37] [127.0.0.1][bccd9fbd][ManagementConnection] New connection established.
[601848 ms] Port forwarding 64412 > 43857 > 43857 stderr: Connection established
[602040 ms] [02:56:38] [127.0.0.1][44be8ea0][ExtensionHostConnection] New connection established.
[602046 ms] [02:56:38] [127.0.0.1][44be8ea0][ExtensionHostConnection] <359> Launched Extension Host Process.
[36770938 ms] Start: Run in container: cat /proc/91281/environ

Steps to Reproduce:

  1. Use SSH extension to connect to a remote Linux server
  2. In the VS Code file explorer, open a git repo with a .devcontainer/ devcontainer.json present
  3. Click the UI prompt to reopen in a container or use the command prompt to open in container
  4. Container opens fine on the remote host, but extensions never install as defined in the devcontainer.json. Installing extensions... is found in the logs, but nothing installs.
  5. Browser to the extension UI section in VS Code and observe no extensions listed as options to install under the devcontainer section.
  6. Either manually search and install extensions or use the profile extension sync to install in the container without issue.

Does this issue occur when you try this locally?: No (When I use the same repo and devcontainer locally using WSL/docker-desktop on my same Windows local host, extensions automatically install) Does this issue occur when you try this locally and all extensions are disabled?: Yes

devcontainer.json:

{
  "name": "docker-net_dev",

  "image": "docker-net_dev:2.0.0",
  "runArgs": [
    "--name", "${localEnv:USER}_devcontainer",
    "--env", "CONTAINER_OWNER=${localEnv:USER}",
		// Cache vscode estensions installs and homedir
		"-v", "${localEnv:USER}_devcontainer-extensions:/root/.vscode-server/extensions",
		// Keep command history
		"-v", "${localEnv:USER}_devcontainer-commandhistory:/commandhistory",
		// Mount docker socket for docker builds
		"-v", "/var/run/docker.sock:/var/run/docker.sock",
		// Mount ssh
		"-v", "${env:HOME}${env:USERPROFILE}/.ssh:/home/netdev/.ssh",
		// Mount gitconfig
		"-v", "${env:HOME}${env:USERPROFILE}/.gitconfig:/home/netdev/.gitconfig" // Required due to volume mount used for .vscode-server
  ],

  "workspaceFolder": "/home/netdev/repos",

  "workspaceMount": "source=${localWorkspaceFolder}/..,target=${containerWorkspaceFolder},type=bind,consistency=cached",

  "remoteUser": "netdev",

  "updateRemoteUserUID": true,

  "extensions": [
    "DavidAnson.vscode-markdownlint", // https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
    "GSGBen.fortigate-fortios-syntax", // https://marketplace.visualstudio.com/items?itemName=GSGBen.fortigate-fortios-syntax
    "GitLab.gitlab-workflow", // https://marketplace.visualstudio.com/items?itemName=GitLab.gitlab-workflow
    "GrapeCity.gc-excelviewer", // https://marketplace.visualstudio.com/items?itemName=GrapeCity.gc-excelviewer
    "Tyriar.sort-lines", // https://marketplace.visualstudio.com/items?itemName=Tyriar.sort-lines
    "WyattFerguson.jinja2-snippet-kit", // https://marketplace.visualstudio.com/items?itemName=WyattFerguson.jinja2-snippet-kit
    "aaron-bond.better-comments", // https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments
    "aristapublisher.eos", // https://marketplace.visualstudio.com/items?itemName=aristapublisher.eos
    "bbenoist.vagrant", // https://marketplace.visualstudio.com/items?itemName=bbenoist.vagrant
    "christian-kohler.path-intellisense", // https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense
    "codezombiech.gitignore", // https://marketplace.visualstudio.com/items?itemName=codezombiech.gitignore
    "csholmq.excel-to-markdown-table", // https://marketplace.visualstudio.com/items?itemName=csholmq.excel-to-markdown-table
    "darkriszty.markdown-table-prettify", // https://marketplace.visualstudio.com/items?itemName=darkriszty.markdown-table-prettify
    "dzgmelody.vscode-changelog-snippets", // https://marketplace.visualstudio.com/items?itemName=dzgmelody.vscode-changelog-snippets
    "esbenp.prettier-vscode", // https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
    "exiasr.hadolint", // https://marketplace.visualstudio.com/items?itemName=exiasr.hadolint
    "hashicorp.terraform", // https://marketplace.visualstudio.com/items?itemName=hashicorp.terraform
    "jamiewoodio.cisco", // https://marketplace.visualstudio.com/items?itemName=jamiewoodio.cisco
    "jithurjacob.nbpreviewer", // https://marketplace.visualstudio.com/items?itemName=jithurjacob.nbpreviewer
    "mblode.pretty-formatter", // https://marketplace.visualstudio.com/items?itemName=mblode.pretty-formatter
    "mechatroner.rainbow-csv", // https://marketplace.visualstudio.com/items?itemName=mechatroner.rainbow-csv
    "moshfeu.compare-folders", // https://marketplace.visualstudio.com/items?itemName=moshfeu.compare-folders
    "ms-azuretools.vscode-docker", // https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
    "ms-python.python", // https://marketplace.visualstudio.com/items?itemName=ms-python.python
    "ms-python.vscode-pylance", // https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance
    "ms-toolsai.jupyter", // https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
    "mtxr.sqltools", // https://marketplace.visualstudio.com/items?itemName=mtxr.sqltools
    "nhoizey.gremlins", // https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins
    "oderwat.indent-rainbow", // https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow
    "petli-full.json-to-yaml-and-more", // https://marketplace.visualstudio.com/items?itemName=petli-full.json-to-yaml-and-more
    "rangav.vscode-thunder-client", // https://marketplace.visualstudio.com/items?itemName=rangav.vscode-thunder-client
    "redhat.ansible", // https://marketplace.visualstudio.com/items?itemName=redhat.ansible
    "redhat.vscode-yaml", // https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml
    "samuelcolvin.jinjahtml", // https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml
    "streetsidesoftware.code-spell-checker", // https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker
    "timonwong.shellcheck", // https://marketplace.visualstudio.com/items?itemName=timonwong.shellcheck
    "wmaurer.change-case", // https://marketplace.visualstudio.com/items?itemName=wmaurer.change-case
    "yzhang.markdown-all-in-one" // https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one
  ],

  "settings": {
    "ansible.ansible.path": "/home/netdev/.local/bin/ansible",
    "ansible.ansible.useFullyQualifiedCollectionNames": true,
    "ansible.ansibleLint.enabled": true,
    "ansible.ansibleLint.path": "/home/netdev/.local/bin/ansible-lint",
    "ansible.executionEnvironment.containerEngine": "docker",
    "ansible.executionEnvironment.enabled": true,
    "ansible.executionEnvironment.image": "repo.test.com:5051/networks/network-ansible-ee:2.12-latest",
    "ansible.executionEnvironment.pullPolicy": "missing",
    "ansible.python.interpreterPath": "/usr/local/bin/python3",
    "cSpell.enableFiletypes": ["md"],
    "diffEditor.ignoreTrimWhitespace": false,
    "editor.bracketPairColorization.enabled": true,
    "editor.detectIndentation": false,
    "editor.formatOnPaste": false,
    "editor.tabSize": 2,
    "extensions.autoUpdate": true,
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": false,
    "files.trimTrailingWhitespace": true,
    "gitlab-ci.gitlabURL": "https://gitlab.test.com",
    "hadolint.cliOptions": [
      "--ignore", "DL3008",
      "--ignore", "DL3013",
      "--ignore", "DL3016",
      "--ignore", "DL4006",
      "--trusted-registry", "docker.io",
      "--trusted-registry", "gitlab.test.com:5050",
      "--trusted-registry", "repo.test.com:5000"
    ],
    "hadolint.hadolintPath": "/usr/local/bin/hadolint",
    "sortLines.filterBlankLines": true,
    "[markdown]": { // Section needed for changelog snippets
      "editor.quickSuggestions": {
        "other": true, // this must be true
        "comments": false,
        "strings": false
      }
    },
    "markdownlint.config": { // rules to follow our general linting in gitlab & pre-commit
      "default": true,
      "MD004": { "style": "dash" },
      "MD013": {
        "line_length": 250,
        "code_blocks": false,
        "tables": false
      },
      "MD024": { "allow_different_nesting": true },
      "MD033": false,
      "MD035": { "style": "---" }
    },
    "python.autoComplete.addBrackets": true,
    "python.formatting.autopep8Path": "/home/netdev/.local/bin/autopep8",
    "python.formatting.blackPath": "/home/netdev/.local/bin/black",
    "python.formatting.provider": "black",
    "python.formatting.yapfPath": "/home/netdev/.local/bin/yapf",
    "python.linting.banditPath": "/home/netdev/.local/bin/bandit",
    "python.linting.enabled": true,
    "python.linting.flake8Args": [
      "--extend-ignore=E203,W503",
      "--verbose",
      "--max-line-length=160"
    ],
    "python.linting.flake8Path": "/home/netdev/.local/bin/flake8",
    "python.linting.mypyPath": "/home/netdev/.local/bin/mypy",
    "python.linting.pycodestylePath": "/home/netdev/.local/bin/pycodestyle",
    "python.linting.pydocstylePath": "/home/netdev/.local/bin/pydocstyle",
    "python.linting.pylintEnabled": true,
    "python.linting.pylintPath": "/home/netdev/.local/bin/pylint",
    "python.linting.pytest": "/home/netdev/.local/bin/pytest",
    "python.pythonPath": "/usr/local/bin/python3",
    "redhat.telemetry.enabled": false,
    "sync.quietSync": true,
    "telemetry.enableTelemetry": false,
    "telemetry.telemetryLevel": "off"
  }
}

ryanmerolle avatar Sep 14 '22 13:09 ryanmerolle

This probably needs a ssh label also.

ryanmerolle avatar Sep 14 '22 18:09 ryanmerolle

I've been having a similar problem with Docker containers on WSL2. It stopped working at some point. I see the same code-server --extensions-download-dir ~/.vscode-server/extensionsCache --install-extension ... --start-server line but nothing gets installed. The only thing that comes to mind is that on WSL I always need to pass --network=host for docker to work.

If I run that code-server line from the logs manually inside the container or I run the whole docker exec line from outside everything works. After setting "remote.containers.logLevel": "trace" I see those lines inside vscode:

RequestService#request (node) - begin https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
RequestService#request (node) - begin https://az764295.vo.msecnd.net/extensions/marketplace.json

But no success messages or extension requests like when manually running:

RequestService#request (node) - begin https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
resolveShellEnv(): skipped (--force-disable-user-env)
Scanned system extensions: 30
Scanned system extensions: 30
Started scanning user extensions
Scanned user extensions: 0
RequestService#request (node) - success https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
RequestService#request (node) - begin https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
resolveShellEnv(): skipped (--force-disable-user-env)
RequestService#request (node) - success https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
RequestService#request (node) - begin https://bbenoist.gallerycdn.vsassets.io/extensions/bbenoist/doxygen/1.0.0/1474455248702/Microsoft.VisualStudio.Code.Manifest

Trass3r avatar Sep 16 '22 10:09 Trass3r

The extensions are downloaded from within the container. Is the remote host behind a network proxy?

chrmarti avatar Sep 19 '22 08:09 chrmarti

The server is air-gapped. I can manually install extensions using the UI or using the code --install-extensions <extension-id> command in the devcontainer's terminal. My host PC where VS Code runs is not air-gapped. If the extensions are indeed downloaded from within the container, then I would imagine the cli command would not install the extensions. Am I missing something @chrmarti ?

ryanmerolle avatar Sep 20 '22 15:09 ryanmerolle

What more info do you need, or this a label that needs to be removed?

ryanmerolle avatar Sep 24 '22 13:09 ryanmerolle

code --install-extensions <extension-id> might go through the UI if it cannot download the extension directly. This different with the extensions installed during server startup where the UI might not be available yet. /cc @sandy081

chrmarti avatar Sep 27 '22 15:09 chrmarti

code --install-extensions might go through the UI if it cannot download the extension directly.

I do not think this goes through UI on VS Code Desktop client. It is always a CLI command.

sandy081 avatar Sep 27 '22 16:09 sandy081

The cli command works just fine when I run it myself from the terminal.

ryanmerolle avatar Sep 27 '22 23:09 ryanmerolle

@sandy081 Why does code --install-extension succeed when the server CLI fails to install the extensions?

chrmarti avatar Sep 28 '22 08:09 chrmarti

What is the error?

sandy081 avatar Sep 28 '22 08:09 sandy081

There is no error, the list of extensions passed on server startup is:

DavidAnson.vscode-markdownlint 
GSGBen.fortigate-fortios-syntax 
GitLab.gitlab-workflow 
GrapeCity.gc-excelviewer 
Tyriar.sort-lines 
WyattFerguson.jinja2-snippet-kit 
aaron-bond.better-comments 
aristapublisher.eos 
bbenoist.vagrant 
christian-kohler.path-intellisense 
codezombiech.gitignore 
csholmq.excel-to-markdown-table 
darkriszty.markdown-table-prettify 
dzgmelody.vscode-changelog-snippets 
esbenp.prettier-vscode 
exiasr.hadolint 
hashicorp.terraform 
jamiewoodio.cisco 
jithurjacob.nbpreviewer 
mblode.pretty-formatter 
mechatroner.rainbow-csv 
moshfeu.compare-folders 
ms-azuretools.vscode-docker 
ms-python.python 
ms-python.vscode-pylance 
ms-toolsai.jupyter 
mtxr.sqltools 
nhoizey.gremlins 
oderwat.indent-rainbow 
petli-full.json-to-yaml-and-more 
rangav.vscode-thunder-client 
redhat.ansible 
redhat.vscode-yaml 
samuelcolvin.jinjahtml 
streetsidesoftware.code-spell-checker 
timonwong.shellcheck 
wmaurer.change-case 
yzhang.markdown-all-in-one

The log shows Installing extensions..., but nothing else related to extensions from the server.

chrmarti avatar Sep 28 '22 08:09 chrmarti

Th ui shows no extensions installed. I pass the same exact command via a bash script when the devcontainer is handed over and the extensions install.

ryanmerolle avatar Sep 28 '22 10:09 ryanmerolle

Could be the server has network issues connecting to the marketplace, say some proxy related?

sandy081 avatar Sep 28 '22 16:09 sandy081

@sandy081

I assume you mean the network issue is only present during the creation of the container, correct? Because the install happens just fine if I execute the same commands on the devcontainer terminal.

I’m happy to explore that. Any particular logging I can enable to force a debug view in the devcontainer log to rule this out?

ryanmerolle avatar Sep 28 '22 22:09 ryanmerolle

See my previous post, "remote.containers.logLevel": "trace".

Trass3r avatar Sep 28 '22 23:09 Trass3r

@ryanmerolle Is the remote host behind a network proxy?

chrmarti avatar Sep 29 '22 07:09 chrmarti

The remote host is air gapped. Apologies for leaving that out. The local host has a network proxy.

@Trass3r sorry for missing that log. I will enable now and report back.

ryanmerolle avatar Sep 29 '22 18:09 ryanmerolle

Looking at the logs after I enabled trace, I now see an ECONNRESET code proceeding the install extensions command.

So is it that vs code extensions are installed on the remote devcontianer at startup by going direct to the extension storefront, but once the VS Code workspace/window fully loads, it connects to the storefront using the access my local machine that has the VS Code UI running?

I am confused as to why there are 2 methods of accessing the storefront depending on where in the devcontainer startup process you are at.

ryanmerolle avatar Sep 29 '22 18:09 ryanmerolle

I see this was tagged with a label of feature request. What is the feature I am asking for? Happy to help, better articulate the issue, or step through an approach you might suggest.

Regardless, thanks for your time and focus.

ryanmerolle avatar Oct 03 '22 20:10 ryanmerolle

I have the same problem and open an issue about it.

However, going lower about it, I found the root cause and a workaround I'm currently using.

I'm running this script as a postCreateCommand on my devcontianer.json.


echo "Manual install of code extensions"
sleep 5

# https://github.com/microsoft/vscode-remote-release/issues/1042

export PATH=`echo ~/.vscode-server/bin/*/bin`:$PATH
export VSCODE_IPC_HOOK_CLI="$(ls /tmp/vscode-ipc-*.sock  | head -n 1)"
code_server_bin=$(ps -aux | grep "bin/code-server" | awk '{print $12}' | head -n 1)
code_bin=$(dirname "$code_server_bin")/remote-cli/code

echo $VSCODE_IPC_HOOK_CLI
echo $code_bin

extensions_to_install=$(yq eval '.customizations.vscode.extensions | join(" --install-extension ")'  -P ./.devcontainer/devcontainer.json)

echo "$code_bin --install-extension $extensions_to_install"
$code_bin --install-extension $extensions_to_install

davzucky avatar May 24 '23 02:05 davzucky

I do something similar @davzucky at postCreateCommand and I get the following error:

Command is only available in WSL or inside a Visual Studio Code terminal.

I run the same script after start and it works fine.

ryanmerolle avatar May 26 '23 14:05 ryanmerolle