Skip to content

Extension Gallery logs TypeErrors when latest-version metadata omits files #330526

Description

Description

When the Extension Gallery latest-version resource returns a successful response whose version metadata omits the files array, VS Code assumes the array exists while resolving assets. This throws Cannot read properties of undefined (reading 'filter').

The error is caught and VS Code falls back to the Gallery query API, so extension update discovery can still succeed, but each check produces misleading errors such as:

Error while getting the engine for the version <version>. Cannot read properties of undefined (reading 'filter')
Error while getting the latest version for the extension <extension-id>. Cannot read properties of undefined (reading 'filter')

The response shape was observed from the Microsoft-managed Marketplace feed for these extensions:

  • ms-vscode.vscode-chat-customizations-evaluations1.1.2026072818
  • ms-vscode.ts-customized-language-service1.1.2026072402
  • redhat.vscode-yaml1.25.2026080108

The same three failures repeated during a subsequent update check. Feed versions may have advanced since the observation. The public Marketplace latest-version endpoint currently includes files, so reproducing outside an environment with the Microsoft-managed/private Gallery may not be possible.

Reproduction

  1. Run the latest VS Code Insiders in an environment configured with a managed/private Extension Gallery whose latest-version resource can omit versions[].files.
  2. Install or enable one of the affected extensions listed above. All three produced the error in the observed logs.
  3. Run Extensions: Check for Extension Updates from the Command Palette.
  4. Run Developer: Open Logs Folder.
  5. Open the newest session's window1/renderer.log and search for reading 'filter' or Error while getting the engine.

The same entries may also be visible in the Developer Tools console.

Expected

VS Code should treat a latest-version response without asset-file metadata as incomplete and use the existing query API fallback without logging an exception.

Actual

Asset lookup throws before the existing fallback runs, causing error-level log entries even though the fallback can recover.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugextensionsIssues concerning extensions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions