denoland/deno · warning

Deno.autoUpdate: no patch available for

Error message

Deno.autoUpdate: no patch available for

What it means

The update manifest was fetched and parsed, its version differs from the running Deno.desktopVersion, but manifest.patches has no entry keyed by the current version (cli/rt/desktop.rs:1078-1083). The delta-update model requires a patch for every source version, so the runtime cannot update and warns, logging both versions. The app remains on its current version.

Source

Thrown at cli/rt/desktop.rs:1151

            return;
          }}
          if (!op_desktop_verify_ed25519(publicKey, sig, te.encode(signed))) {{
            console.error("Deno.autoUpdate: manifest signature verification failed");
            return;
          }}
          // Re-parse the signed payload — only its contents are trusted.
          try {{
            manifest = JSON.parse(signed);
          }} catch {{
            console.error("Deno.autoUpdate: signed payload is not valid JSON");
            return;
          }}
          if (manifest.version === _version) return;
        }}

        const patchEntry = manifest.patches?.[_version];
        if (!patchEntry) {{
          console.warn("Deno.autoUpdate: no patch available for",
            _version, "->", manifest.version);
          return;
        }}
        // Accept either a string (legacy/unsafe) or {{ name, sha256 }}. The
        // SHA-256 is required — Rust will reject the patch otherwise.
        const patchName = typeof patchEntry === "string"
          ? patchEntry
          : patchEntry?.name;
        const patchSha256 = typeof patchEntry === "object"
          ? patchEntry?.sha256
          : undefined;
        if (!patchName) {{
          console.error("Deno.autoUpdate: malformed patch entry");
          return;
        }}
        if (typeof patchSha256 !== "string" || patchSha256.length !== 64) {{
          console.error(
            "Deno.autoUpdate: manifest patch entry must include sha256",

View on GitHub (pinned to f7822238ca)

Solutions

  1. Add a patches entry keyed by the exact running version, e.g. patches['1.0.0'] = { name, sha256 }, and republish latest.json
  2. If you do not intend to delta-patch old versions, tell those users to reinstall the latest full build so no patch is needed
  3. Compare Deno.desktopVersion (printed in the warning) against the patches keys character-by-character to catch formatting mismatches
  4. If using signed manifests, ensure the signed payload itself contains the patches map, since only its contents are trusted

Example fix

// before: user on 1.0.0, manifest only patches 1.1.0
{"version":"1.2.0","patches":{"1.1.0":{"name":"p-1.1.0.bin","sha256":"aa..."}}}

// after: backfill an entry for every supported source version
{"version":"1.2.0","patches":{
  "1.0.0":{"name":"p-1.0.0.bin","sha256":"bb..."},
  "1.1.0":{"name":"p-1.1.0.bin","sha256":"aa..."}
}}
Defensive patterns

Strategy: validation

Validate before calling

// release-time check: every supported source version must have a valid patch entry
const manifest = JSON.parse(await Deno.readText("latest.json"));
const supported = ["1.0.0", "1.1.0"]; // versions still in the field
for (const v of supported) {
  const e = manifest.patches?.[v];
  if (!e?.name || typeof e.sha256 !== "string" || e.sha256.length !== 64) {
    throw new Error(`latest.json: missing/invalid patch entry for ${v}`);
  }
}

Type guard

function hasPatchFor(m: unknown, version: string): m is { patches: Record<string, { name: string; sha256: string }> } {
  const p = (m as { patches?: Record<string, unknown> })?.patches;
  const e = p?.[version] as { name?: unknown; sha256?: unknown } | undefined;
  return !!e && typeof e.name === "string" && typeof e.sha256 === "string" && e.sha256.length === 64;
}

Prevention

When it happens

Trigger: Publishing release 1.2.0 with patches only from 1.1.0 while users run 1.0.0; a patches map keyed with a different version format than the baked-in _version (e.g., 'v1.0.0' vs '1.0.0'); a publish pipeline that only generates a patch from the immediately previous release; with publicKey configured, the signed payload re-parsed from manifest.signed lacking the patches entry.

Common situations: Users on old skipped versions after several rapid releases; release scripts that forget to backfill patches for still-supported versions; version-string mismatches between deno.json and the manifest keys.

Related errors


AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20). Data as JSON: /api/errors/4fba81819f079a4e. Report an issue: GitHub.