tauri-apps/tauri · error
failed to parse plugin manifest map
Error message
failed to parse plugin manifest map
What it means
Thrown at build time when the ACL/plugin manifest map file in the build output dir was read successfully but `serde_json::from_str` fails to parse it. The file exists (error 131's read succeeded) but its contents are not valid JSON matching the expected `BTreeMap<String, Manifest>` schema — usually a truncated, hand-edited, or stale/corrupted generated file.
Solutions
- Delete the corrupted manifests file or `cargo clean` and rebuild so the CLI regenerates it.
- Validate the JSON file manually to confirm corruption (e.g. `python -m json.tool <file>`).
- Ensure the tauri CLI version matches the tauri crates in Cargo.toml so schemas align.
- Never hand-edit files under the build output directory.
Example fix
# before: corrupted generated file kept failing the build # after: remove and regenerate cargo clean && cargo tauri build
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
const file = 'src-tauri/target/<profile>/build/<hash>/out/acl-manifests.json';
if (fs.existsSync(file)) {
try { JSON.parse(fs.readFileSync(file, 'utf8')); }
catch (e) { console.error('corrupted manifest map, run cargo clean:', e.message); process.exit(1); }
} Prevention
- Avoid killing builds mid-write; let them finish or clean afterwards
- Pin matching tauri CLI and crate versions
- Never edit files in the build output directory
- Run `cargo clean` when switching toolchain or CLI versions
When it happens
Trigger: `tauri build`/`tauri dev` where the generated ACL manifests JSON was truncated by an interrupted previous build, manually edited, or written by an incompatible CLI version.
Common situations: Killing a build mid-write; mixing tauri-cli versions across builds; hand-editing generated files in the target dir; disk-full leaving partial JSON.
Understand the failure class
Background: JSON parse error: "Unexpected token" / "not valid JSON" / "failed to parse" — what JSON parsers are really complaining about — this error's family across 45 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- failed to parse capabilities
- failed to serialize global API script paths
- embedded file asset has no parent
- failed to parse plugin global API script paths
- failed to read capabilities
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/62b7e377f546c4ec.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-codegen/src/context.rs:399
);
}
let schema = options.isolation_schema;
quote!(#root::Pattern::Isolation {
assets: ::std::sync::Arc::new(#assets),
schema: #schema.into(),
key: #key.into(),
crypto_keys: std::boxed::Box::new(::tauri::utils::pattern::isolation::Keys::new().expect("unable to generate cryptographically secure keys for Tauri \"Isolation\" Pattern")),
})
}
};
let acl_file_path = out_dir.join(ACL_MANIFESTS_FILE_NAME);
let acl: BTreeMap<String, Manifest> = if acl_file_path.exists() {
let acl_file =
std::fs::read_to_string(acl_file_path).expect("failed to read plugin manifest map");
serde_json::from_str(&acl_file).expect("failed to parse plugin manifest map")
} else {
Default::default()
};
let capabilities_file_path = out_dir.join(CAPABILITIES_FILE_NAME);
let capabilities_from_files = if capabilities_file_path.exists() {
let capabilities_json =
std::fs::read_to_string(&capabilities_file_path).expect("failed to read capabilities");
serde_json::from_str(&capabilities_json).expect("failed to parse capabilities")
} else {
Default::default()
};
let capabilities = get_capabilities(
&config,
capabilities_from_files,
additional_capabilities.as_deref(),
)
.unwrap();View on GitHub (pinned to 460ec35447)