{"record":{"id":"f190e7d6bf317016","repo":"denoland/deno","slug":"could-not-find-backend-app-bundle-inside","errorCode":null,"errorMessage":"could not find '{backend}' .app bundle inside {} (backend may not ship as an app for target '{target}')","messagePattern":"could not find '(.+?)' \\.app bundle inside (.+?) \\(backend may not ship as an app for target '(.+?)'\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":2140,"sourceCode":"  /// 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\n        )\n      });\n    }\n\n    let dir = self.ensure_downloaded(backend, target).await?;\n    locate_app_bundle(&dir, backend).ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"could not find '{backend}' .app bundle inside {} (backend may not ship as an app for target '{target}')\",\n        dir.display()\n      )\n    })\n  }\n\n  /// Directory containing the backend binary and its support files (used on\n  /// Windows / Linux where support files sit alongside the binary).\n  async fn find_binary_dir(\n    &self,\n    backend: &str,\n    target: &str,\n  ) -> Result<PathBuf, AnyError> {\n    let binary = self.find_binary(backend, target).await?;\n    let parent = binary.parent().ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"LAUFEY backend binary has no parent directory: {}\",\n        binary.display()","sourceCodeStart":2122,"sourceCodeEnd":2158,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/desktop.rs#L2122-L2158","documentation":"Same macOS .app lookup as above but on the downloaded path: ensure_downloaded() verified and extracted the archive, yet locate_app_bundle() finds no .app inside the cache dir. The trailing hint ('backend may not ship as an app for target') reflects the most common cause — the requested backend/target simply packages no .app (that is a Linux/Windows-style archive).","triggerScenarios":"Requesting an .app on macOS for a backend whose pinned archive does not contain one (layout/platform mismatch), or an archive layout change that moved/renamed the .app after a LAUFEY_VERSION bump.","commonSituations":"Cross-target builds where the target string does not select a darwin archive; a laufey release that stopped shipping .app bundles for a backend; extraction truncated the bundle (disk full).","solutions":["Make sure the target you pass is a macOS (darwin) target that the pinned laufey release ships as an .app.","List the cached archive contents (unzip -l) to confirm whether an .app is present at all.","Delete the cache dir and re-run to rule out truncated extraction.","If the release intentionally ships no .app for that backend, choose a backend that does, or update deno so the pin matches a release with the expected layout."],"exampleFix":"# before (macOS)\ndeno desktop --backend webview2 --target x86_64-pc-windows-msvc\n# error: could not find 'webview2' .app bundle inside ~/.cache/... (backend may not ship as an app...)\n\n# after: use a macOS target/backend pair that ships an .app\ndeno desktop --target aarch64-apple-darwin","handlingStrategy":"validation","validationCode":"# Before requesting an .app-based build, confirm the cached archive actually contains one\nzip=\"$HOME/.cache/deno/desktop/laufey/$VER-$TARGET/$BACKEND.zip\"\n[ -f \"$zip\" ] && unzip -l \"$zip\" | grep -q '\\.app/$' \\\n  || echo \"no .app in cached archive — pick a darwin target that ships one\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match backend and target: .app bundles only exist for darwin archives of backends that ship them.","When bumping laufey pins, verify each backend still ships the artifact types the macOS path expects.","Read the trailing hint in the error text — it names the most likely cause (backend not shipped as app for target)."],"tags":["macos","app-bundle","laufey","archive","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"}