{"record":{"id":"d8703a536d56eed3","repo":"denoland/deno","slug":"deno-autoupdate-check-failed","errorCode":null,"errorMessage":"Deno.autoUpdate: check failed:","messagePattern":"Deno\\.autoUpdate: check failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/rt/desktop.rs","lineNumber":1190,"sourceCode":"        }}\n        const patchResp = await fetch(base + \"/\" + patchName, {{\n          cache: \"no-store\",\n          redirect: \"error\",\n        }});\n        if (!patchResp.ok) return;\n        const patchBytes = new Uint8Array(await patchResp.arrayBuffer());\n        op_desktop_apply_patch(patchBytes, patchSha256);\n        if (typeof onUpdateReady === \"function\") {{\n          try {{ onUpdateReady(manifest.version); }} catch (e) {{\n            console.error(\"Deno.autoUpdate onUpdateReady threw:\", e);\n          }}\n        }}\n        if (autoUpdateTimer) {{\n          clearInterval(autoUpdateTimer);\n          autoUpdateTimer = null;\n        }}\n      }} catch (e) {{\n        console.warn(\"Deno.autoUpdate: check failed:\", e.message);\n      }}\n    }};\n\n    setTimeout(check, 1000);\n    if (interval) {{\n      autoUpdateTimer = setInterval(check, interval);\n    }}\n  }}\n\n  Object.defineProperties(Deno, {{\n    desktopVersion: propReadOnly(_version),\n    autoUpdate: propWritable(autoUpdate),\n  }});\n}})();\n\"#,\n    version = serde_json::to_string(&version).unwrap(),\n    rolled_back = if rolled_back { \"true\" } else { \"false\" },\n    release_base_url = serde_json::to_string(&release_base_url).unwrap(),","sourceCodeStart":1172,"sourceCodeEnd":1208,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/rt/desktop.rs#L1172-L1208","documentation":"This is the catch-all handler around the entire async update check in cli/rt/desktop.rs:1118-1120: any exception during the cycle is swallowed and logged with e.message. It covers network failures fetching latest.json or the patch file, and errors thrown out of op_desktop_apply_patch (e.g., SHA-256 mismatch). The app keeps running; the interval timer retries on the next tick.","triggerScenarios":"fetch rejecting because the machine is offline, DNS fails, TLS fails, or the server redirects (redirect: 'error'); the patch download returning !resp.ok is silent, but a rejected arrayBuffer() logs here; op_desktop_apply_patch throwing when the downloaded patch's hash does not match the manifest sha256; anything thrown by user callbacks is caught separately, so this message is infrastructure, not callback, failure.","commonSituations":"Laptops resuming from sleep with dead sockets; corporate proxies intercepting https; self-signed or expired certificates on the update host; re-uploading a patch artifact without updating its sha256 in the manifest; update host down during deploys.","solutions":["Read the appended e.message first: 'fetch failed' points to network/DNS/TLS; hash/patch errors point to a manifest-artifact mismatch","From the same machine, curl -f the latest.json and patch URLs to confirm they are reachable over https with no redirects","If the sha256 mismatches, republish the patch artifact and update its sha256 in latest.json","Keep the interval option set so transient failures retry on the next tick instead of stopping updates"],"exampleFix":"# before: typo'd host, every check logs 'check failed: fetch failed'\nDeno.autoUpdate({ url: \"https://updatess.example.com/myapp\" });\n\n# after: verify the endpoint, then enable with a retry interval\n$ curl -f https://updates.example.com/myapp/latest.json\nDeno.autoUpdate({ url: \"https://updates.example.com/myapp\", interval: 3_600_000 });","handlingStrategy":"retry","validationCode":"// preflight the update host before enabling autoUpdate\nconst health = await fetch(`${url}/latest.json`, { redirect: \"error\", cache: \"no-store\" });\nif (!health.ok) throw new Error(`update host unhealthy: ${health.status}`);\nDeno.autoUpdate({ url, interval: 3_600_000 }); // interval => failed checks retry","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the interval option; the internal catch logs and the timer retries on the next tick","Serve latest.json and patch files over plain https with zero redirects","Recompute and update sha256 in the manifest whenever a patch artifact is re-uploaded","Read the appended e.message to classify: fetch failures are environmental, hash failures are release mistakes"],"tags":["desktop","auto-update","network","fetch","patching"],"backgroundTag":"auto-update-check-failed","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T04:17:50.494Z"}