v4.5.1(74721): docker context ls gives `invalid character '\x00' looking for beginning of value`` (original) (raw)

TLDR: I have found out that some contexts' "meta.json" files under "~/.docker/contexts/*" were broken (all zeros inside) after the update for a reason. I don't know why it happens so can't say if it is avoidable. Removing these broken context files/folders seems to fix it, but since it involves deleting things do it cautiously.


Actual behavior

I use VSCode to work within containers. I got 2 updates recently; the previous one seemingly had no problem on me with WSL2, but I decided to update to the latest, 74721, because your update notes were telling me there were problems with that.

Now after the update, my containers are running but trying to get the list in VSCode docker extension, it fails to connect to docker. From the error I got, I tried docker context ls on a separate terminal and got this response: invalid character '\x00' looking for beginning of value

Expected behavior

Information

I don't know if this can be reproducible, but the problem is new, at least for me. And yes problem started with this latest update, also I don't use any experimental features. I have stopped both WSL2's LxssManager ad let docker restart it, and also shutdown docker and restarted it. None solved the problem.

Output of & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check

[047:13:58:51.101][I] ipc.NewClient: 5c156424-com.docker.diagnose -> \\.\pipe\dockerBackendV2 com.docker.service.exe
[goroutine 1 [running, locked to thread]:
[win/backend/pkg/service.NewClientForPath(...)
[       win/backend/pkg/service/service.go:42
[win/backend/pkg/service.NewClient({0x15ef112, 0x13}, {0x0, 0x0, 0x0})
[       win/backend/pkg/service/service.go:31 +0xd0
[common/pkg/diagkit/gather/diagnose.init()
[       common/pkg/diagkit/gather/diagnose/ipc_windows.go:23 +0x11f
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0001: is the application running?
[SKIP] DD0018: does the host support virtualization?
[PASS] DD0002: does the bootloader have virtualization enabled?
[PASS] DD0017: can a VM be started?
[PASS] DD0024: is WSL installed?
[PASS] DD0021: is the WSL 2 Windows Feature enabled?
[PASS] DD0022: is the Virtual Machine Platform Windows Feature enabled?
[PASS] DD0025: are WSL distros installed?
[PASS] DD0026: is the WSL LxssManager service running?
[PASS] DD0029: is the WSL 2 Linux filesystem corrupt?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0005: is the user in the docker-users group?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0006: is the Docker Desktop Service responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
No fatal errors detected.

Steps to reproduce the behavior

I don't know how to reproduce this. All I can say is this:

  1. I installed docker 1-2 months ago
  2. Since then I had 2 or 3 updates.
  3. This last update has this problem with it.