{"record":{"id":"ed45e5ceff3f3bc5","repo":"denoland/deno","slug":"unsupported-archive-format-name","errorCode":null,"errorMessage":"unsupported archive format: {name}","messagePattern":"unsupported archive format: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":2321,"sourceCode":"        std::fs::create_dir_all(parent)?;\n      }\n      let mut out = std::fs::File::create(&dest_path)?;\n      std::io::copy(&mut entry, &mut out)?;\n      #[cfg(unix)]\n      {\n        use std::os::unix::fs::PermissionsExt;\n        // Mask to 0o755 / 0o644 — same policy as the tar branch.\n        // setuid/setgid/sticky bits are dropped; world-writable bits too.\n        let mode = entry.unix_mode().unwrap_or(0o644);\n        let safe = if mode & 0o111 != 0 { 0o755 } else { 0o644 };\n        let _ = std::fs::set_permissions(\n          &dest_path,\n          std::fs::Permissions::from_mode(safe),\n        );\n      }\n    }\n  } else {\n    bail!(\"unsupported archive format: {name}\");\n  }\n  Ok(())\n}\n\n/// Resolve the backend binary path inside an extracted archive directory.\nfn locate_backend_binary(\n  dir: &Path,\n  backend: &str,\n  target: &str,\n) -> Option<PathBuf> {\n  let is_windows = target.contains(\"windows\");\n  let is_macos = target.contains(\"apple-darwin\");\n  match backend {\n    \"cef\" if is_macos => {\n      let p = dir.join(\"laufey.app/Contents/MacOS/laufey\");\n      p.exists().then_some(p)\n    }\n    \"webview\" if is_macos => {","sourceCodeStart":2303,"sourceCodeEnd":2339,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/desktop.rs#L2303-L2339","documentation":"Thrown by the LAUFEY archive extractor when the archive filename ends in neither `.tar.gz` nor `.zip`, so no extraction branch applies. The name comes from the tool's own laufey_archive_name for the current platform/target, so seeing this error means the internal archive naming and the extractor disagree — normally a version skew or upstream release-layout change, not something the CLI flags control.","triggerScenarios":"A Deno version whose laufey_archive_name emits a new extension (e.g. `.tar.xz` or `.tar.zst`) while this extractor only handles `.tar.gz`/`.zip`; a custom/patched build where the archive name constant was changed; a cache directory holding a renamed file that the locator then passes to the extractor.","commonSituations":"Using a bleeding-edge or locally built deno binary after the laufey release layout changed; mixing binaries/caches between Deno versions.","solutions":["Update to the latest Deno release where naming and extractor are kept in sync.","If on a custom build, align the archive name with a supported extension (.tar.gz or .zip) or extend the extractor.","Clear the LAUFEY cache so no stale/renamed files interfere, and report the mismatch to the deno maintainers if a released binary hits it."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"# Detect and fall back to a stable toolchain\nset +e; OUT=\"$(deno desktop main.ts 2>&1)\"; RC=$?; set -e\nif grep -q \"unsupported archive format\" <<<\"$OUT\"; then\n  echo \"archive/extractor skew — switching to stable deno\" >&2\n  dvm use stable && deno desktop main.ts\nelse\n  exit $RC\nfi","preventionTips":["Use released Deno builds for desktop work; canary/self-built binaries can skew archive naming vs. extractor support.","Do not mix LAUFEY caches between Deno versions — clear the cache on upgrade.","Report the mismatch (archive name + deno version) upstream when a released binary hits it."],"tags":["desktop","laufey","archive","unsupported-format","version-skew"],"backgroundTag":"unsupported-archive-format","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}