You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reflect-metadata 0.2.x vs 0.1.x global registry clobbering causes "Missing required @injectable annotation" in Python & Jupyter #26320
ms-python.python bundles reflect-metadata 0.2.x (uses Symbol.for("@reflect-metadata:registry")), whereas ms-python.vscode-python-envs and ms-toolsai.jupyter bundle reflect-metadata 0.1.x (closure-scoped MetadataProvider, no @reflect-metadata:registry).
When extensions activate out of order in the same extension host:
Whichever copy of reflect-metadata installs/replaces the global Reflect.* functions last makes classes decorated under the other version's store invisible to InversifyJS.
Neither ms-python.python (depending on ms-python.vscode-python-envs) nor ms-toolsai.jupyter (depending on ms-python.python) enforces the required activation order in extensionDependencies.
Verification / Workaround
Enforcing the activation order ms-python.vscode-python-envs → ms-python.python → ms-toolsai.jupyter via package.json:
In an isolated test with the same user settings, globalStorage, and workspace/notebook:
Python DI errors: 1 → 0
Jupyter DI / controller creation errors: 28–36 → 0
Suggested Fix
Align reflect-metadata across ms-python.python, ms-python.vscode-python-envs, and ms-toolsai.jupyter (all on 0.2.x so they share Symbol.for("@reflect-metadata:registry")).
Declare the missing extensionDependencies if activation order is required.
Also reproduced on macOS (Apple Silicon): disabling the Azure extensions fixed it
Environment
VS Code 1.148.0, macOS arm64
ms-python.python 2026.10.0
ms-python.vscode-python-envs 1.44.0
ms-toolsai.jupyter 2026.6.2026071501
Symptoms:Missing required @injectable annotation. The Python extension failed to activate and the kernel picker did not list any Python environments.
Fix: Disabling these extensions resolved it. The kernel was auto-detected and loaded, with no Missing required @... errors in the logs and with the original, unmodified extension manifests:
All three declare reflect-metadata ^0.2.2. I did not test them one at a time, so I don't know which of them is responsible.
Adding the extensionDependencies load-order workaround alone was not enough here: .venv appeared in the picker, but selecting it failed with the same error while creating the notebook controller.
Activity
muldergj commentedon Nov 30, 2026
Also reproduced on macOS (Apple Silicon): disabling the Azure extensions fixed it
Environment
Symptoms:
Missing required @injectable annotation. The Python extension failed to activate and the kernel picker did not list any Python environments.Fix: Disabling these extensions resolved it. The kernel was auto-detected and loaded, with no
Missing required @...errors in the logs and with the original, unmodified extension manifests:All three declare
reflect-metadata ^0.2.2. I did not test them one at a time, so I don't know which of them is responsible.Adding the
extensionDependenciesload-order workaround alone was not enough here:.venvappeared in the picker, but selecting it failed with the same error while creating the notebook controller.