vmware / vmware/photon

Remote Container debugging using VSCode fails in Photon OS

Open
#1,340 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
3.2k
Forks
692
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When using Remote Container debugging extension of VSCode to debug Photon OS container, it fails with below logs msg

[22 ms] Remote-Containers 0.241.3 in VS Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a).
[21 ms] Start: Resolving Remote
[23 ms] Setting up container: /type-express-srv4
[30 ms] Start: Run: docker inspect --type container /type-express-srv4
[149 ms] Start: Check Docker is running
[149 ms] Start: Run: docker version --format {{.Server.APIVersion}}
[292 ms] Server API version: 1.41
[293 ms] Start: Inspecting container
[293 ms] Start: Run: docker inspect --type container 6461f8496631948afcf481adcec4569c678cd0847a2cf202230f4e7cb2c40d79
[367 ms] Start: Run in container: /bin/sh
[369 ms] Start: Run in container: uname -m
[569 ms] aarch64
[569 ms]
[569 ms] Start: Run in container: (cat /etc/os-release || cat /usr/lib/os-release) 2>/dev/null
[574 ms] NAME="VMware Photon OS"
VERSION="4.0"
ID=photon
VERSION_ID=4.0
PRETTY_NAME="VMware Photon OS/Linux"
ANSI_COLOR="1;34"
HOME_URL="https://vmware.github.io/photon/"
BUG_REPORT_URL="https://github.com/vmware/photon/issues"
[574 ms]
[574 ms] Start: Run in container: cat /etc/passwd
[579 ms] Start: Run in container: test -d /root/.vscode-server
[582 ms]
[583 ms]
[583 ms] Start: Run in container: test ! -f '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' && set -o noclobber && mkdir -p '/root/.vscode-server/data/Machine' && { > '/root/.vscode-server/data/Machine/.writeMachineSettingsMarker' ; } 2> /dev/null
[586 ms]
[586 ms]
[586 ms] Exit code 1
[586 ms] Start: Run in container: cat /root/.vscode-server/data/Machine/settings.json
[590 ms]
[590 ms] cat: /root/.vscode-server/data/Machine/settings.json: No such file or directory
[590 ms] Exit code 1
[590 ms]
Support for ARM64 is in preview.

[590 ms] Start: Run in container: test -d /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a
[593 ms]
[593 ms]
[593 ms] Exit code 1
[593 ms] Installing VS Code Server for commit 3b889b090b5ad5793f524b5d1d39fda662b96a2a
[594 ms] Start: Installing VS Code Server
[594 ms] Start: Run in container: mkdir -p /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a_1659239364084
[599 ms]
[599 ms]
[625 ms] Start: Run in container: (dd iflag=fullblock bs=8192 count=6258 2>/dev/null; dd iflag=fullblock bs=2631 count=1 2>/dev/null) | tar --no-same-owner -xz -C /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a_1659239364084
[636 ms]
[636 ms] zcat: not gzip
[637 ms] Start: Run in container: mv -n /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a_1659239364084/* /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a && rmdir /root/.vscode-server/bin/3b889b090b5ad5793f524b5d1d39fda662b96a2a_1659239364084
[662 ms] Shell server terminated (code: 2, signal: null)

Reproduction steps
1. Install VS Code & "Remote Development" extensions for VS Code
2. Bring up a simple NodeJs app within the Photon OS container
3. Use the "Remote Explorer" icon in the left nav bar (installed as part of the "Remote Development" extension) to show a list of containers running (including the PhotonOS container)
4. Right-click on the Photon OS container and select "Attach to container"
5. Monitor the terminal and the error throw
Expected behavior

Should allow using remote development extension to debug and connect to PhotonOS container

Additional context

No response

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.

Research direction

The issue names no repository files or tests; start by reproducing the VS Code Remote Development attach flow with the Photon OS container and review the VS Code Server installation logs, especially the failed archive extraction. Done means the extension can attach to and debug the Photon OS container successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux, node.js, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.