{"record":{"id":"62b7e377f546c4ec","repo":"tauri-apps/tauri","slug":"failed-to-parse-plugin-manifest-map","errorCode":null,"errorMessage":"failed to parse plugin manifest map","messagePattern":"failed to parse plugin manifest map","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-codegen/src/context.rs","lineNumber":397,"sourceCode":"        panic!(\"The isolation application does not contain a file setting the `window.__TAURI_ISOLATION_HOOK__` value.\");\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  )\n  .unwrap();","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-codegen/src/context.rs#L379-L415","documentation":"Build-time panic in tauri-codegen: serde_json::from_str over OUT_DIR/acl-manifests.json .expect(\"failed to parse plugin manifest map\") fails when the cached file is invalid JSON for the current Manifest struct. The file is generated by tauri-build, so a parse failure means the artifact is corrupt/truncated or was written by a different Tauri version than the one now parsing it.","triggerScenarios":"Building right after upgrading tauri / tauri-build / tauri-codegen while a stale acl-manifests.json from the old version remains in OUT_DIR; a truncated file from an interrupted build; mixed versions in one workspace where the writer's Manifest schema differs from the reader's.","commonSituations":"Tauri version bump without cleaning target; CI layer/cache reuse of a target directory across Tauri upgrades; workspace mixing pinned old tauri-plugin-* crates with new tauri-utils.","solutions":["cargo clean and rebuild so acl-manifests.json is regenerated by the current Tauri version","Verify all Tauri crates resolve to one version: `cargo tree -i tauri-utils` and `cargo tree -i tauri-codegen`, align or deduplicate","Invalidate CI target-dir caches whenever Cargo.lock changes Tauri versions","If it persists, inspect target/<triple>/debug/build/<crate-*/out/acl-manifests.json for truncation or accidental hand-edits"],"exampleFix":"# before: cargo build after upgrading tauri\n# panic: failed to parse plugin manifest map\n\n# after\ncargo clean && cargo tree -i tauri-utils  # confirm a single version, then rebuild","handlingStrategy":"validation","validationCode":"# after any Tauri version change, drop stale codegen caches\ncargo clean && cargo tree -i tauri-utils  # must show exactly one version","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Key CI build caches on Cargo.lock so Tauri upgrades never reuse a stale OUT_DIR","Keep tauri, tauri-build, tauri-codegen and tauri-utils on one aligned version line","cargo clean after upgrading Tauri in a workspace"],"tags":["acl","build","json","codegen"],"backgroundTag":"stale-build-artifact","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}