{"record":{"id":"7250a2f2ea4baa7f","repo":"denoland/deno","slug":"could-not-find-laufey-app-under-to-re-sign","errorCode":null,"errorMessage":"could not find laufey.app under {} to re-sign","messagePattern":"could not find laufey\\.app under (.+?) to re-sign","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/desktop.rs","lineNumber":2786,"sourceCode":"  Ok(())\n}\n\n/// Re-sign the cached laufey.app's binaries so the running binary's\n/// identifier matches its host bundle's `CFBundleIdentifier`. Run once\n/// per fresh download; HMR mode runs laufey.app directly (no per-project\n/// wrapper), so without this UN sees `Identifier=laufey` /\n/// `CFBundleIdentifier=com.deno.desktop` and refuses notification\n/// authorization. Best-effort: failures here are logged but don't\n/// abort the install, since most desktop features still work without\n/// notifications.\n#[cfg(target_os = \"macos\")]\nfn harmonize_cached_laufey_identifiers(\n  install_dir: &Path,\n  backend: &str,\n) -> Result<(), AnyError> {\n  let laufey_app = locate_laufey_app_in_install(install_dir, backend)\n    .ok_or_else(|| {\n      deno_core::anyhow::anyhow!(\n        \"could not find laufey.app under {} to re-sign\",\n        install_dir.display()\n      )\n    })?;\n  harmonize_laufey_app_identifiers(&laufey_app)\n}\n\n/// Idempotently re-sign every Mach-O in `<laufey.app>/Contents/MacOS/` so\n/// its code-signing identifier matches the bundle's `CFBundleIdentifier`.\n/// macOS `usernoted` rejects UN authorization with\n/// `UNErrorCodeNotificationsNotAllowed` when the running binary's\n/// signed identifier disagrees with the bundle id (\"Legacy client X\n/// connecting to modern client\" in the daemon log). The linker-signed\n/// default for the laufey binary is `Identifier=laufey`, which never matches.\n/// Safe to call on every launch — binaries already at the correct\n/// identifier are skipped without a re-sign.\n#[cfg(target_os = \"macos\")]\nfn harmonize_laufey_app_identifiers(laufey_app: &Path) -> Result<(), AnyError> {","sourceCodeStart":2768,"sourceCodeEnd":2804,"githubUrl":"https://github.com/denoland/deno/blob/89f33cbef296a2b287f323d42de54c871fa69c77/cli/tools/desktop.rs#L2768-L2804","documentation":"Error \"could not find laufey.app under {} to re-sign\" thrown in denoland/deno.","triggerScenarios":"Thrown at cli/tools/desktop.rs:2786 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"89f33cbef296a2b287f323d42de54c871fa69c77","analyzedAt":"2026-08-16T07:54:21.310Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}