Skip to content

Local Quick Start: setup failures show "Process exited with code N" or a 3-minute "still initializing" #948

Closed

Description

Found testing v0.10.2 (c39c9b0b). src/services/localQuickStart/ is unchanged on main (fa7bcbf5). Image latest = 0.117.0, on WSL2 with Docker Desktop 29.8. Related: #840, #854.

ID Sev Bug
ERR-1 P2 Every Docker CLI failure during pull/create is reported as Process exited with code N. isPortAllocationFailure never matches.
ERR-2 P2 Readiness keeps retrying for 180 s when the container is dead or auth is rejected, then says "still initializing" and offers Wait longer
ERR-3 P3 No deadline on the creating stage. Cancel leaves the docker container run CLI process orphaned.
ERR-4 P2 Docker CLI not installed (Linux/WSL) is reported as "Docker daemon unreachable"
ERR-5 P3 A temp dir containing ' breaks docker run: Process exited with code 2

ERR-1: Docker's stderr never reaches the user

Repro Shown Docker actually said
Advanced → image tag 0.117.0-nope Process exited with code 1 manifest unknown
docker run -d --name vscode-documentdb-local alpine sleep 1d (unlabelled), then Set up Process exited with code 125 container name already in use
docker rmi the image so the pull is slow; during Pulling run python3 -m http.server 10260 --bind 127.0.0.1 Process exited with code 125 (unexpectedFailure) port is already allocated
docker pause vscode-documentdb-local, then Start in the tree (the tree shows it as Stopped) Process exited with code 1 container is paused; unpause it
  • Where: the pull, create and start paths reject with the bare ChildProcessError (Discussion: upstream our Docker failure-diagnosis enhancements to @microsoft/vscode-container-client #840 item 1). isPortAllocationFailure (QuickStartService.ts:103, used at :895) matches on error.message, which never contains stderr, so it is dead code.
  • Expected: capture stderr for pull and create the way dockerProbes.ts CapturingTeeWritable already does for probes. Then the port case maps to portInUse, and the others show Docker's first error line.

ERR-2: a dead container or rejected credentials wait out the full 180 s

waitForReadiness (QuickStartService.ts:1219-1245) retries every error until the deadline and never looks at the container.

Repro (custom credentials) Probe error Result after 184 s
username documentdb ECONNREFUSED: the container exits within seconds readinessTimeout + Wait longer
password with an emoji Unassigned code point (SASLprep) same
username of 64 characters Invalid account: User details not found same
  • It also happens with defaults: run docker kill vscode-documentdb-local during "Waiting for DocumentDB".
  • Expected:
    • Inspect the container between attempts. If it has exited, fail at once with the exit code and the last log lines.
    • Treat auth and SASLprep errors as terminal.
    • Offer Wait longer only when the container is running and the error is still connection-level.
  • The input validation that should stop these values reaching Docker is tracked in Local Quick Start: wizard accepts credentials and ports that setup can't honor #949.

ERR-3: a hung docker run hangs setup at "Creating container"

  • Repro: Configure → port 65535 → Set up. On Docker Desktop, docker run never returns for this port.
  • Result:
    • Setup sits at "Creating container" indefinitely (about 9 minutes observed).
    • Cancel returns in about 6 s and removes the container, but the docker container run child process is left running.
  • Expected: a create-stage deadline with a clear message, and on cancel, kill the child if it doesn't exit.

ERR-4: missing Docker CLI is reported as "daemon unreachable"

  • Repro: start VS Code with a PATH that has no docker, then Set up.
  • Result: dockerDaemonUnreachable. The readiness result has cliInstalled: true, daemonReachable: false, failureKind: unknown.
  • Where: DockerReadinessService.ts:447: cliInstalled = versionOk || infoProbe.spawnErrorCode !== 'ENOENT'. The probes run through a shell, so a missing binary is the shell's exit 127, never ENOENT.
  • Expected: treat the shell's exit 127 as "CLI missing", so the user gets dockerCliMissing and the install guidance.

ERR-5: apostrophe in the temp dir breaks setup

  • Repro: start VS Code with TMPDIR="/tmp/qs it's", then Set up.
  • Result: fails at Creating with Process exited with code 2. Spaces, $ and backticks in the path work.
  • Where: the path is passed strong-quoted through the shell runner, and Bash.quote() in @microsoft/vscode-processutils renders /tmp/qs it's/x.env as '/tmp/qs it\'s/x.env'. Bash doesn't allow escapes inside single quotes, so the shell hits a syntax error (exit 2). The env-file path is built in ContainerRuntime.ts (envFiles, :98).
  • Fix options: escape ' as '\'' before handing the path over, or write the env file under a directory whose path we control.

Testing

QuickStartServiceImpl takes its container runtime in the constructor. QuickStartService.test.ts (mockRuntime) and QuickStartProvisionDurability.test.ts (runtimeFor, with mongodb mocked) show how to fake Docker and drive provision() and the lifecycle methods without a daemon. Readiness classification has its own tests in DockerReadinessService.test.ts and dockerReadinessClassification.test.ts (ERR-4).

Activity

  1. added 6 commits that reference this issue on Sep 23, 2026
    3b95d34
    7ffe776
    7a3dd33
    dbef34a
    8847379
    799e9d2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions