denoland/deno · warning
Deno.autoUpdate: missing 'url' option, skipping
Error message
Deno.autoUpdate: missing 'url' option, skipping
What it means
Deno.autoUpdate() is the desktop-build auto-update hook injected by cli/rt/desktop.rs. Before starting update checks it requires a non-empty string url, defaulting to the release_base_url baked in at compile time. When that default is empty and the caller passed no usable url, the runtime logs this warning and silently skips all update checks. It is a configuration gap, not a crash: the app keeps running on its current version.
Source
Thrown at cli/rt/desktop.rs:1085
onUpdateReady,
onRollback,
publicKey,
}} = opts;
if (_rolledBack && typeof onRollback === "function") {{
queueMicrotask(() => {{
try {{ onRollback(ROLLBACK_REASON); }} catch (e) {{
console.error("Deno.autoUpdate onRollback threw:", e);
}}
}});
}}
if (!_version) {{
console.warn("Deno.autoUpdate: no version in deno.json, skipping");
return;
}}
if (typeof url !== "string" || url.length === 0) {{
console.warn("Deno.autoUpdate: missing 'url' option, skipping");
return;
}}
if (!isHttpsUrl(url)) {{
console.error(
"Deno.autoUpdate: refusing non-https url (got %s); ignoring.", url,
);
return;
}}
const base = url.replace(/\/$/, "");
const te = new TextEncoder();
const check = async () => {{
try {{
const resp = await fetch(base + "/latest.json", {{
cache: "no-store",
redirect: "error",
}});View on GitHub (pinned to f7822238ca)
Solutions
- Pass an explicit https url string: Deno.autoUpdate({ url: "https://updates.example.com/myapp" })
- If the url should be implicit, compile/package the desktop binary with a non-empty release_base_url so the default resolves
- Make sure the url option is a plain string, not a URL instance (URL objects fail the typeof check)
- Confirm version is set in deno.json at build time; without it autoUpdate skips even earlier with a different warning
Example fix
// before
Deno.autoUpdate(); // desktop build compiled without release_base_url
// after
Deno.autoUpdate({ url: "https://updates.example.com/myapp", interval: 3_600_000 }); Defensive patterns
Strategy: validation
Validate before calling
// fail loudly instead of letting autoUpdate silently skip
const opts = typeof cfg === "string" ? { url: cfg } : (cfg ?? {});
if (typeof opts.url !== "string" || opts.url.length === 0) {
throw new Error("Deno.autoUpdate: explicit https url required (no baked-in release_base_url)");
}
if (!opts.url.startsWith("https://")) {
throw new Error(`Deno.autoUpdate: refusing non-https url: ${opts.url}`);
}
Deno.autoUpdate(opts); Type guard
function hasAutoUpdateUrl(o: unknown): o is { url: string } {
return typeof o === "object" && o !== null &&
typeof (o as { url?: unknown }).url === "string" &&
(o as { url: string }).url.length > 0;
} Prevention
- Compile desktop builds with release_base_url so the default url is never empty
- Always pass url as a plain string; URL instances fail the typeof check
- Set version in deno.json at build time; autoUpdate skips entirely without it
When it happens
Trigger: Calling Deno.autoUpdate() with no arguments in a desktop binary that was compiled without a release_base_url; calling Deno.autoUpdate({ url: "" }); or passing a url that is not a plain string (e.g., a URL instance or number), because only typeof url === "string" passes the guard at cli/rt/desktop.rs:1013.
Common situations: CI packaging pipelines that omit the release-base-url build flag; refactors that start passing a URL object instead of a string; early prototyping before an update server exists.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- Deno.autoUpdate: no version in deno.json, skipping
- Deno.autoUpdate: latest.json is not valid JSON
- Deno.autoUpdate: no patch available for
- Deno.autoUpdate: check failed:
- The url passed into 'proxy.url' has an invalid scheme for th
AI-assisted analysis of denoland/deno@f7822238ca (2026-08-20).
Data as JSON: /api/errors/6622bea9281fd39b.
Report an issue: GitHub.