{"record":{"id":"a38ace348e3f53d9","repo":"tauri-apps/tauri","slug":"failed-to-read-plugin-manifest-map","errorCode":null,"errorMessage":"failed to read plugin manifest map","messagePattern":"failed to read plugin manifest map","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-codegen/src/context.rs","lineNumber":398,"sourceCode":"          \"The isolation application does not contain a file setting the `window.__TAURI_ISOLATION_HOOK__` value.\"\n        );\n      }\n\n      let schema = options.isolation_schema;\n\n      quote!(#root::Pattern::Isolation {\n        assets: ::std::sync::Arc::new(#assets),\n        schema: #schema.into(),\n        key: #key.into(),\n        crypto_keys: std::boxed::Box::new(::tauri::utils::pattern::isolation::Keys::new().expect(\"unable to generate cryptographically secure keys for Tauri \\\"Isolation\\\" Pattern\")),\n      })\n    }\n  };\n\n  let acl_file_path = out_dir.join(ACL_MANIFESTS_FILE_NAME);\n  let acl: BTreeMap<String, Manifest> = if acl_file_path.exists() {\n    let acl_file =\n      std::fs::read_to_string(acl_file_path).expect(\"failed to read plugin manifest map\");\n    serde_json::from_str(&acl_file).expect(\"failed to parse plugin manifest map\")\n  } else {\n    Default::default()\n  };\n\n  let capabilities_file_path = out_dir.join(CAPABILITIES_FILE_NAME);\n  let capabilities_from_files = if capabilities_file_path.exists() {\n    let capabilities_json =\n      std::fs::read_to_string(&capabilities_file_path).expect(\"failed to read capabilities\");\n    serde_json::from_str(&capabilities_json).expect(\"failed to parse capabilities\")\n  } else {\n    Default::default()\n  };\n  let capabilities = get_capabilities(\n    &config,\n    capabilities_from_files,\n    additional_capabilities.as_deref(),\n  )","sourceCodeStart":380,"sourceCodeEnd":416,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-codegen/src/context.rs#L380-L416","documentation":"Thrown at build time when tauri-codegen finds the ACL/plugin manifest map file (ACL_MANIFESTS_FILE_NAME, e.g. acl-manifests.json) in the build output directory but `std::fs::read_to_string` fails to read it. The file exists (checked just before) so the read failure is typically permissions, it having been removed/raced between check and read, or it being a directory/invalid path. The build cannot continue without the manifest map.","triggerScenarios":"Running `tauri build`/`tauri dev` when the previously generated ACL manifests file exists in the target output dir but is unreadable: permission changes, file deleted between `exists()` and read, or the path became a directory.","commonSituations":"Dirty target directories from previous builds with different permissions; builds run as different users (root vs user) leaving root-owned generated files; concurrent builds racing on the same output dir.","solutions":["Delete the stale generated file (or `cargo clean` / remove the tauri build output dir) and rebuild.","Check file permissions/ownership of the generated manifests file in the out dir and fix them (or rebuild as the same user).","Avoid running multiple builds concurrently into the same target directory.","Re-run the tauri CLI so the manifests are regenerated cleanly."],"exampleFix":"# before: stale unreadable generated file\nrm -rf src-tauri/target/release/build/*/out\n# then rebuild\ncargo tauri build","handlingStrategy":"validation","validationCode":"const path = 'src-tauri/target/release/build';\n// before building, ensure no stale root-owned generated files:\nconst fs = require('fs');\nfor (const f of findFiles(path, 'acl-manifests.json')) {\n  const st = fs.statSync(f);\n  if (!Number(process.getuid?.() ?? 0) !== 0 && st.uid !== process.getuid?.()) {\n    console.warn(`unreadable generated file (owner uid ${st.uid}): ${f} — clean it`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always build as the same user; `cargo clean` after switching users","Don't run concurrent tauri builds sharing one target dir","Never hand-edit generated files under target/","Add `cargo clean` to CI when switching runner users or caching target dirs"],"tags":["build-time","filesystem","file-read","tauri"],"backgroundTag":"file-read-failed","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}