microsoft / microsoft/vscode-remote-release

Docker Credential Helper list subcommand disconnects vscode from devcontainer

Open
#9,603 1 comment 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Dec 12, 2024.

bug containers
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

  • VSCode Version: 1.86.2

  • Local OS Version: Windows 10 22H2 19045.3930

  • Remote OS Version: Debian 11

  • Remote Extension/Connection Type: Containers

  • Logs:

[2024-02-27T16:37:52.078Z] Start: Run: C:\Users\vgraeser\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\spec-node\devContainersSpecCLI.js outdated --workspace-folder C:\Users\vgraeser\AppData\Local\Programs\Microsoft VS Code --config c:\Users\vgraeser\AppData\Local\Temp\dev-container-tmp-b5439e20-60b8-4866-a4c1-e4ca258df227\.devcontainer.json --output-format json --log-level trace --log-format json --terminal-columns 267 --terminal-rows 21
[2024-02-27T16:37:52.704Z] @devcontainers/cli 0.56.0. Node.js v18.17.1. win32 10.0.19045 x64.
[2024-02-27T16:37:52.704Z] Start: Run: git rev-parse --show-cdup
[2024-02-27T16:37:52.930Z] Port forwarding 51021 > 46317 > 46317 stderr: Remote close
[2024-02-27T16:37:52.947Z] Stop (5370 ms): Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/node -e 
[2024-02-27T16:37:52.948Z] Port forwarding 51021 > 46317 > 46317 terminated with code 0 and signal null.
[2024-02-27T16:37:53.103Z] Stop (399 ms): Run: git rev-parse --show-cdup
[2024-02-27T16:37:53.105Z] > input: ghcr.io/devcontainers/features/docker-outside-of-docker:1
[2024-02-27T16:37:53.105Z] >
[2024-02-27T16:37:53.105Z] > resource: ghcr.io/devcontainers/features/docker-outside-of-docker
[2024-02-27T16:37:53.105Z] > id: docker-outside-of-docker
[2024-02-27T16:37:53.106Z] > owner: devcontainers
[2024-02-27T16:37:53.106Z] > namespace: devcontainers/features
[2024-02-27T16:37:53.106Z] > registry: ghcr.io
[2024-02-27T16:37:53.106Z] > path: devcontainers/features/docker-outside-of-docker
[2024-02-27T16:37:53.106Z] >
[2024-02-27T16:37:53.106Z] > version: 1
[2024-02-27T16:37:53.106Z] > tag?: 1
[2024-02-27T16:37:53.106Z] > digest?: undefined
[2024-02-27T16:37:53.107Z] Error loading extra certificates from C:\Users\vgraeser\cert: EISDIR: illegal operation on a directory, read
[2024-02-27T16:37:53.363Z] [httpOci] Attempting to authenticate via 'Bearer' auth.
[2024-02-27T16:37:53.408Z] [httpOci] Invoking credsStore credential helper 'wincred'
[2024-02-27T16:37:53.408Z] Start: Run: docker-credential-wincred get
[2024-02-27T16:37:53.451Z] Port forwarding 51022 > 46317 > 46317 stderr: Remote close
[2024-02-27T16:37:53.487Z] Stop (5592 ms): Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/node -e 
[2024-02-27T16:37:53.488Z] Port forwarding 51022 > 46317 > 46317 terminated with code 0 and signal null.
[2024-02-27T16:37:53.648Z] Stop (240 ms): Run: docker-credential-wincred get
[2024-02-27T16:37:53.648Z] [httpOci] Failed to query for 'ghcr.io' credential from 'docker-credential-wincred': [object Object]
[2024-02-27T16:37:53.649Z] [httpOci] No authentication credentials found for registry 'ghcr.io' via docker config or credential helper.
[2024-02-27T16:37:53.649Z] [httpOci] No authentication credentials found for registry 'ghcr.io'. Accessing anonymously.
[2024-02-27T16:37:53.649Z] [httpOci] Attempting to fetch bearer token from:  https://ghcr.io/token?service=ghcr.io&scope=repository:devcontainers/features/docker-outside-of-docker:pull
[2024-02-27T16:37:54.113Z] [httpOci] 200 on reattempt after auth: https://ghcr.io/v2/devcontainers/features/docker-outside-of-docker/tags/list
[2024-02-27T16:37:54.114Z] Published versions (sorted) for 'docker-outside-of-docker': [
  "1.0.9",
  "1.0.10",
  "1.1.0",
  "1.2.0",
  "1.2.1",
  "1.3.0",
  "1.3.1",
  "1.3.2",
  "1.4.0",
  "1.4.1",
  "1.4.2"
]
[2024-02-27T16:37:54.155Z] Stop (2077 ms): Run: C:\Users\vgraeser\AppData\Local\Programs\Microsoft VS Code\Code.exe c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\spec-node\devContainersSpecCLI.js outdated --workspace-folder C:\Users\vgraeser\AppData\Local\Programs\Microsoft VS Code --config c:\Users\vgraeser\AppData\Local\Temp\dev-container-tmp-b5439e20-60b8-4866-a4c1-e4ca258df227\.devcontainer.json --output-format json --log-level trace --log-format json --terminal-columns 267 --terminal-rows 21
[2024-02-27T16:38:16.555Z] Start: Run in container: cat /proc/593/environ
[2024-02-27T16:38:16.561Z] Stop (6 ms): Run in container: cat /proc/593/environ
[2024-02-27T16:38:44.990Z] Received message: []
[2024-02-27T16:38:51.146Z] Extensions cache, copy to shared cache: None
[2024-02-27T16:39:00.234Z] Looking up Docker credential helper for ''.
[2024-02-27T16:39:00.378Z] Host server: Exception thrown by PacketStream substream end handler Error: unexpected end of parent stream
    at q.destroy (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:4103)
    at q.write (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:4840)
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:6932
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:2001
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4621
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:1378
    at n (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4569)
    at s (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:1954)
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:2116
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4621
Error: unexpected end of parent stream
    at q.destroy (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:4103)
    at q.write (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:4840)
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:6932
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:2001
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4621
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:9:1378
    at n (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4569)
    at s (/home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:1954)
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:2116
    at /home/vscode/.vscode-remote-containers/dist/vscode-remote-containers-server-0.338.1.js:5:4621
[2024-02-27T16:39:00.383Z] Stop (81163 ms): Run in Host: docker exec -i -u root 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /bin/sh -c echo "New container started. Keep-alive process started." ; export VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 ; /bin/sh
[2024-02-27T16:39:00.384Z] Stop (80186 ms): Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /bin/sh
[2024-02-27T16:39:00.384Z] Stop (79981 ms): Run in Host: docker exec -i -u root 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /bin/sh
[2024-02-27T16:39:00.384Z] Stop (79576 ms): Run in Host: docker exec -i -u vscode 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /bin/sh
[2024-02-27T16:39:00.384Z] Stop (79255 ms): Run in Host: docker exec -i -u vscode -e SHELL=/bin/bash -e VSCODE_AGENT_FOLDER=/home/vscode/.vscode-server -w /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/bin/code-server --log trace --force-disable-user-env --server-data-dir /home/vscode/.vscode-server --use-host-proxy --telemetry-level all --accept-server-license-terms --host 127.0.0.1 --port 0 --connection-token-file /home/vscode/.vscode-server/data/Machine/.connection-token-903b1e9d8990623e3d7da1df3d33db3e42d80eda --extensions-download-dir /home/vscode/.vscode-server/extensionsCache --install-extension ms-azuretools.vscode-docker --start-server --disable-websocket-compression --skip-requirements-check
[2024-02-27T16:39:00.385Z] Stop (78873 ms): Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/node -e 
[2024-02-27T16:39:00.386Z] Stop (78214 ms): Run in Host: docker exec -i -u vscode -e VSCODE_REMOTE_CONTAINERS_SESSION=ee3b7d79-9637-4bda-9bb8-feac2444283f1709051801660 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047 /home/vscode/.vscode-server/bin/903b1e9d8990623e3d7da1df3d33db3e42d80eda/node -e 
[2024-02-27T16:39:00.399Z] Container server did not launch or terminated: Error: unexpected end of parent stream
	at Si.destroy (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:26638)
	at Si.write (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:27379)
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:29482
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:14866
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:17539
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:23891
	at r (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:17487)
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:17532
	at Object.cb (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:24002)
	at l (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:21998)
	at u (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:22260)
	at c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:27:22343
	at s (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:30:5371)
	at Socket.<anonymous> (c:\Users\vgraeser\.vscode\extensions\ms-vscode-remote.remote-containers-0.338.1\dist\extension\extension.js:30:5472)
	at Socket.emit (node:events:514:28)
	at addChunk (node:internal/streams/readable:324:12)
	at readableAddChunk (node:internal/streams/readable:297:9)
	at Socket.push (node:internal/streams/readable:234:10)
	at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
[2024-02-27T16:39:00.400Z] Port forwarding 51011 > 46317 > 46317 terminated with error: unexpected end of parent stream
[2024-02-27T16:39:00.400Z] Port forwarding 51012 > 46317 > 46317 terminated with error: unexpected end of parent stream
[2024-02-27T16:39:00.401Z] Keep-alive process ended.
[2024-02-27T16:39:00.401Z] Looking up Docker credential helper for ''.
[2024-02-27T16:39:00.402Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -16 }
[2024-02-27T16:39:00.404Z] Port forwarding 51012 > 46317 > 46317: Local close
[2024-02-27T16:39:00.404Z] Port forwarding 51011 > 46317 > 46317: Local close
[2024-02-27T16:39:00.434Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -155 }
[2024-02-27T16:39:00.440Z] Start: Reconnection attempt 1
  [2024-02-27T16:39:00.441Z] Start: Run in Host: docker inspect --type container 6873715b0b87b8783c08d72f4224e73bae81437b960a61f48aa9239c098fc047
  [2024-02-27T16:39:00.443Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -141 }
  [2024-02-27T16:39:00.449Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -176 }
  [2024-02-27T16:39:00.451Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -210 }
  [2024-02-27T16:39:00.468Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -245 }
  [2024-02-27T16:39:00.494Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -160 }
  [2024-02-27T16:39:00.516Z] Host server: packet-stream asked to read after closed { value: { code: 0, signal: null }, end: false, req: -225 }
  [2024-02-27T16:39:00.646Z] Host server: packet-stream asked to read after closed { value: { code: null, signal: 'SIGPIPE' }, end: false, req: -265 }
  [2024-02-27T16:39:00.691Z] Stop (134108 ms): Run: wsl -d ubuntu -e /bin/sh -c cd '/home/vscode' && /bin/sh
  [2024-02-27T16:39:00.691Z] Host server terminated (code: 0, signal: null).
  [2024-02-27T16:39:45.002Z] Received message: []
  • minimal devcontainer.json to reproduce:
{
	"name": "Docker outside of Docker",
	"image": "mcr.microsoft.com/devcontainers/base:bullseye",
	"features": {
		"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
			"version": "latest",
			"enableNonRootDocker": "true",
			"moby": "true"
		}
	},
	"remoteEnv": {
		"LOCAL_WORKSPACE_FOLDER": "${localWorkspaceFolder}"
	}
}

Steps to Reproduce:

  1. When connected to a devcontainer, cat ~/.docker/config.json to get the name/id of the current credsStore executable
  2. run /usr/local/bin/docker-credential-dev-containers-02e71925-c4e9-4c83-8388-d458a2253f71 list (but with the current id from config.json)

image

VSCode runs the list subcommand against the credential store on the host, which returns the expected output. But the extension host running inside the devcontainer seems to crash when returning the output of the store, which causes the client to lose connection to the devcontainer. The devcontainer itself keeps running, i can immediately reattach to it after reloading the window.

version or get return the proper output and don't trigger the issue.

Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.