Skip to content

Windows extension downloads Linux (ELF) native binary instead of win32-x64 — causes "Zły obraz" / STATUS_INVALID_IMAGE_HASH (0xc000012f) #338

Description

@JanSzulc

Environment

  • OS: Windows 11 Pro 10.0.26200 (x64, genuine native VS Code, verified Code.exe is a valid PE binary)
  • VS Code version: 1.128.0 (commit fc3def6774c76082adf699d366f31a557ce5573f), x64
  • Extension: Codeium.codeium
  • Reproduced on versions: 1.48.2 (latest), 1.47.1, and 1.31.18

Bug
After installing the extension (via code --install-extension and also manually via the Extensions marketplace UI — both reproduce it), VS Code shows:

Code.exe - Wrong image
c:\Users<user>.vscode\extensions\codeium.codeium-\dist<hash>.node
is not designed to run on Windows or it contains an error.
Error code: 0xc000012f

Root cause found
The .node file shipped/downloaded for this extension is a Linux ELF binary, not a Windows PE binary. First 4 bytes are 7F 45 4C 46 (the ELF magic number), not 4D 5A (MZ, expected for a valid Windows binary).

This reproduces identically across three different extension versions (1.48.2, 1.47.1, 1.31.18) — same wrong file, so it isn't a one-off packaging mistake in a single release. It also isn't a local corruption/antivirus issue: environment variables are clean (no platform override), Windows Defender protection history shows no detections/quarantine for this file, and Code.exe itself is a valid native Windows binary.

This suggests the extension's own native-binary download/selection logic (whatever selects/fetches this .node file, whether bundled in the VSIX or fetched post-install) is serving the linux-x64 artifact to a win32-x64 client.

Steps to reproduce

  1. On Windows 11 x64, run code --install-extension Codeium.codeium (or install via the marketplace UI).
  2. Reload/restart VS Code.
  3. Observe the "Wrong image" / bad image error dialog referencing the .node file in dist/.
  4. Inspect the first bytes of that .node file — they are 7F 45 4C 46 (ELF), not 4D 5A (PE).

Expected
A valid win32-x64 PE binary should be installed/downloaded on a Windows x64 machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions