Yeachan-Heo/oh-my-codex · error · Error

[native-assets] manifest version mismatch: expected ${versio

Error message

[native-assets] manifest version mismatch: expected ${version}, received ${manifest.version}

What it means

The manifest was downloaded successfully but its embedded version field does not match the requested package version. This is a consistency check: the manifest at the URL for vX claims a different version, indicating a stale or mis-uploaded release asset.

Source

Thrown at src/cli/native-assets.ts:247

}

export function isRepositoryCheckout(packageRoot = getPackageRoot()): boolean {
  return existsSync(join(packageRoot, '.git'));
}

export async function loadNativeReleaseManifest(
  packageRoot = getPackageRoot(),
  version?: string,
  env: NodeJS.ProcessEnv = process.env,
): Promise<NativeReleaseManifest> {
  const url = await resolveNativeManifestUrl(packageRoot, version, env);
  const response = await fetch(url);
  if (!response.ok) {
    throw new Error(`[native-assets] failed to fetch native release manifest (${response.status} ${response.statusText}) from ${url}`);
  }
  const manifest = await response.json() as NativeReleaseManifest;
  validateNativeReleaseManifest(manifest as never);
  if (version && manifest.version !== version) throw new Error(`[native-assets] manifest version mismatch: expected ${version}, received ${manifest.version}`);
  return manifest;
}

function isUnavailableManifestError(error: unknown): boolean {
  if (!(error instanceof Error)) return false;
  return /\[native-assets\] failed to fetch native release manifest/i.test(error.message)
    || /fetch failed/i.test(error.message);
}

function isUnavailableArchiveError(error: unknown): boolean {
  if (!(error instanceof Error)) return false;
  return /\[native-assets\] failed to download /i.test(error.message)
    || /fetch failed/i.test(error.message);
}

async function downloadFile(url: string, destinationPath: string): Promise<void> {
  const response = await fetch(url);
  if (!response.ok || !response.body) {

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Re-download and inspect the manifest at the printed URL; confirm its version field.
  2. Re-publish the correct manifest asset for the v<version> release.
  3. If mirroring, fix the mirror so each version directory serves the matching manifest.
Defensive patterns

Strategy: try-catch

Try / catch

try { await loadNativeReleaseManifest(root, version); } catch (e) { if (/manifest version mismatch/.test(String(e))) { /* release asset is stale; report to publisher, pin a good version */ } throw e; }

Prevention

When it happens

Trigger: Calling loadNativeReleaseManifest with an explicit version argument when the manifest asset under releases/download/vX contains "version": "Y" — typically a release that was drafted from the wrong build, or a manually patched manifest.

Common situations: Release automation that uploads the manifest built from a different commit than the npm package; manual asset re-uploads; NATIVE_RELEASE_BASE_URL pointed at a mirror whose manifest is a different version.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/fca7d1f23201625a. Report an issue: GitHub.