{"record":{"id":"13ebf06c795bd3ec","repo":"denoland/deno","slug":"could-not-find-backend-backend-binary-inside","errorCode":null,"errorMessage":"could not find '{backend}' backend binary inside {}","messagePattern":"could not find '(.+?)' backend binary inside (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":2115,"sourceCode":"      // id — same fix as the download path, applied every launch\n      // because a fresh `cargo build` of laufey restores the linker's\n      // default `Identifier=laufey`. The harmonize call is idempotent:\n      // already-correct binaries are skipped.\n      #[cfg(target_os = \"macos\")]\n      if let Some(laufey_app) = laufey_app_for_binary(&binary)\n        && let Err(e) = harmonize_laufey_app_identifiers(&laufey_app)\n      {\n        log::warn!(\n          \"[desktop] could not re-sign dev laufey backend: {e} \\\n           (notifications may not work in HMR mode)\"\n        );\n      }\n      return Ok(binary);\n    }\n\n    let dir = self.ensure_downloaded(backend, target).await?;\n    locate_backend_binary(&dir, backend, target).ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"could not find '{backend}' backend binary inside {}\",\n        dir.display()\n      )\n    })\n  }\n\n  /// Locate the LAUFEY `.app` bundle for `backend` on a macOS `target`.\n  async fn find_app_bundle(\n    &self,\n    backend: &str,\n    target: &str,\n  ) -> Result<PathBuf, AnyError> {\n    if let Some(dev_dir) = laufey_dev_dir() {\n      return locate_dev_app_bundle(&dev_dir, backend).ok_or_else(|| {\n        deno_core::anyhow::anyhow!(\n          \"could not find '{backend}' .app bundle under {} (set via {})\",\n          dev_dir.display(),\n          LAUFEY_DEV_DIR_ENV","sourceCodeStart":2097,"sourceCodeEnd":2133,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/desktop.rs#L2097-L2133","documentation":"After ensure_downloaded() succeeds (archive fetched, SHA-256 verified against the lock, extracted into the cache), locate_backend_binary() walks the extracted tree to find the backend executable — and finds nothing. The download itself is trusted, so this means the archive's internal layout does not match what the locator expects, not a network or checksum problem.","triggerScenarios":"A laufey release whose archive puts the backend binary at a new/unexpected path or names it differently; extraction silently dropped files (disk full, permissions); the backend genuinely contains no binary for this platform and the archive is a stub.","commonSituations":"The laufey project restructured its release archives (new top-level dir, renamed binary) while the deno pin still references the old version-compatible expectations; the cache dir was extracted onto a full disk; version skew between the pinned LAUFEY_VERSION archive layout and this deno build's locator.","solutions":["Inspect the cache dir named in the error (tar tf / unzip -l on the cached archive) to see where the binary actually landed.","Delete that cache dir and re-run to rule out a truncated extraction (disk-full, interrupted run).","Update deno to a build whose locator matches the pinned laufey release layout — the pair is meant to move together.","If the layout genuinely changed upstream, file an issue with the archive listing so the locator gets updated."],"exampleFix":"# before\ndeno desktop\n# error: could not find 'wry' backend binary inside ~/.cache/deno/desktop/laufey/v1.2.3-...\n\n# after: inspect, then clear and re-download\nunzip -l ~/.cache/deno/desktop/laufey/v1.2.3-x86_64-pc-windows-msvc/*.zip | less\nrm -rf ~/.cache/deno/desktop/laufey/v1.2.3-x86_64-pc-windows-msvc\ndeno desktop","handlingStrategy":"retry","validationCode":"# After a failed run, inspect the extracted tree to see if the binary exists at all\nfind \"$(deno info | awk '/Cache directory/{print $3}')/desktop/laufey\" -maxdepth 3 -type f 2>/dev/null\n# or simply list the cached archive:\n# unzip -l ~/.cache/deno/desktop/laufey/<ver-target>/*.zip","typeGuard":null,"tryCatchPattern":"Catch the error, print the cache dir from the message, list its contents for the user, delete the dir, and retry once — a fresh verified extraction fixes truncated-output cases; if the pristine archive still lacks the binary, escalate as an upstream layout change instead of retrying again.","preventionTips":["Check free disk space before builds — extraction onto a full disk is a classic silent truncator.","Keep deno updated so its locator matches the pinned laufey release layout (they are versioned together).","When pinning laufey manually, sanity-open one archive of each backend/target to confirm the expected binary path."],"tags":["laufey","archive","cache","layout","desktop"],"backgroundTag":"archive-layout-mismatch","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}