microsoft / microsoft/vscode-remote-release
Dev Containers: declared extensions not installed on rebuild — remote-containers extension host crashes with "PendingMigrationError: navigator is now a global in nodejs"
@chrmarti is already working on this.
Since Jun 2, 2026.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
- VSCode Version: 1.122.1 (also reproduced on 1.121.0 — identical runtime: Node 22.22.1, Electron 39.8.8, Chromium 142.0.7444.265)
- Local OS Version: macOS Darwin arm64 25.5.0
- Remote OS Version: Linux arm64 (dev container, reached over SSH)
- Remote Extension/Connection Type: Dev Containers (over SSH; "localDocker": false). ms-vscode-remote.remote-containers 0.459.0, ms-vscode-remote.remote-ssh 0.123.0
- Logs: see below
Steps to Reproduce:
- Connect to a Dev Container running on a remote host via SSH ("localDocker": false), with several extensions declared in customizations.vscode.extensions.
- Run "Dev Containers: Rebuild Container".
- Observe: the DEV CONTAINER group in the Extensions view shows 0 — none of the declared extensions install. The local extension host log throws PendingMigrationError: navigator is now a global in nodejs from remote-containers 0.459.0 and remote-ssh 0.123.0. Manual "code --install-extension " inside the container works, so only the auto-install orchestration fails.
Does this issue occur when you try this locally?: No — reproduces specifically on Dev Containers over Remote-SSH ("localDocker": false).
Does this issue occur when you try this locally and all extensions are disabled?: No — by nature: the crash is in the Remote-Containers extension (publisher: Microsoft) and its bundled @microsoft/applicationinsights-core-js, interacting with VS Code's own navigator-global polyfill (microsoft/vscode#250619). Disabling extensions makes Dev Containers impossible to use, so it cannot be tested without the extension enabled.
Summary
After a rebuild, none of the extensions declared in customizations.vscode.extensions are installed into the container. They show under LOCAL - INSTALLED with an "Install in Dev Container" button, while the DEV CONTAINER group shows 0. The extensions are loaded by the remote extension host, so the workspace ends up with none of them.
The local extension host log throws PendingMigrationError: navigator is now a global in nodejs from both remote-containers 0.459.0 and remote-ssh 0.123.0 during initialization; the remote extension host log throws the same from the bundled GitHub Copilot Chat. Manually installing the same extensions from inside the container (code --install-extension ) succeeds immediately — so only the automatic install/sync orchestration fails.
Expected behavior
Extensions declared in customizations.vscode.extensions are installed into the container on rebuild.
Actual behavior
Zero declared extensions install. The remote extension host is destabilized by a navigator PendingMigrationError during startup and the auto-install pass does not complete.
Logs (sanitized)
Local extension host — remote-containers 0.459.0:
[error] PendingMigrationError: navigator is now a global in nodejs (https://aka.ms/vscode-extensions/navigator)
at get (.../extensionHostProcess.js:805:7210)
at it (.../ms-vscode-remote.remote-containers-0.459.0/dist/extension/extension.js:20:5257)
at Object.l [as watch] (.../remote-containers-0.459.0/dist/extension/extension.js:21:16146)
at H.<computed> [as initialize] (.../remote-containers-0.459.0/dist/extension/extension.js:23:2720)
Local extension host — remote-ssh 0.123.0:
[error] PendingMigrationError: navigator is now a global in nodejs (https://aka.ms/vscode-extensions/navigator)
at get (.../extensionHostProcess.js:805:7210)
at Et (.../ms-vscode-remote.remote-ssh-0.123.0/out/extension.js:2:282499)
at async t.oneDataSystemClientFactory (.../remote-ssh-0.123.0/out/extension.js:2:334713)
Remote (container) extension host — bundled GitHub Copilot Chat (activationEvent: 'onChatSession:claude-code'):
[error] PendingMigrationError: navigator is now a global in nodejs (https://aka.ms/vscode-extensions/navigator)
at get (file:///vscode/vscode-server/bin/linux-x64/<commit>/out/vs/workbench/api/node/extensionHostProcess.js:805:7210)
at .../vscode-server/bin/linux-x64/<commit>/extensions/copilot/dist/extension.js:337:66523
at new ZodObject (.../extensions/copilot/dist/extension.js:277:11598)
at Module._compile (node:internal/modules/cjs/loader:1705:14)
Diagnostics — other causes ruled out
- Marketplace egress from inside the container is fine: curl -sSI https://marketplace.visualstudio.com and https://main.vscode-cdn.net both return HTTP responses (reachable; TLS + HTTP OK).
- Configuration is correct: the extensions are present in customizations.vscode.extensions.
- Auth/state persists across rebuilds via bind mounts; not an auth-wipe.
- Manual code --install-extension inside the container installs and activates without error — the server itself can install; only the auto-orchestration fails.
- Rolling back VS Code core does not help: 1.121.0 and 1.122.1 share the same runtime (Node 22.22.1) and reproduce identically.
Suspected root cause
Same class as the (closed) #11597: remote-containers uses @microsoft/applicationinsights-core-js, which reads navigator without a null-check during init. With VS Code returning navigator as undefined in the Node extension host (microsoft/vscode#250619), this throws and destabilizes the host, preventing the declared-extension install pass from completing.
Workaround
- "telemetry.telemetryLevel": "off" in local user settings (targets the App Insights init path). Partial / not guaranteed.
- Reliable: install declared extensions via a postAttachCommand in devcontainer.json, bypassing the broken auto-sync:
"postAttachCommand": "for ext in ; do code --install-extension "$ext" --force; done"
Related
#11597 (closed for no-info — this report adds the missing repro), #11358, #11600, microsoft/vscode#278928, microsoft/vscode#283032.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.