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
- Re-download and inspect the manifest at the printed URL; confirm its version field.
- Re-publish the correct manifest asset for the v<version> release.
- 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
- Pin versions known to have consistent releases
- Automate publishing npm package and GitHub release from the same CI job
- Validate manifest.version against the tag in release CI before upload
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
- [native-assets] failed to fetch native release manifest (${r
- manifest_binary_product_mismatch
- manifest_binary_basename_mismatch
- manifest_duplicate_logical_key
- manifest_archive_invalid
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/fca7d1f23201625a.
Report an issue: GitHub.