tauri-apps/tauri · error
The ` ` dependency features on the `Cargo.toml` file does…
Error message
The `{}` dependency features on the `Cargo.toml` file does not match the allowlist defined under `tauri.conf.json`.
Please run `tauri dev` or `tauri build` What it means
tauri-build's manifest check compares the features enabled on tauri-related dependencies in Cargo.toml against the allowlist in tauri.conf.json; a mismatch means generated/checked metadata is stale, so the build stops and asks the user to regenerate via the CLI.
Solutions
- Run `tauri dev` or `tauri build` (the CLI) to regenerate and sync the manifest
- Align Cargo.toml features with the tauri.conf.json allowlist manually
- In CI, invoke the tauri CLI build instead of bare `cargo build`
Example fix
// before (Cargo.toml, allowlist has no fs)
tauri = { version = "2", features = ["fs-all"] }
// after
tauri = { version = "2", features = [] } // or update tauri.conf.json allowlist, then run tauri build Defensive patterns
Strategy: validation
Validate before calling
// before building, let the CLI sync the manifest:
// npx tauri build / tauri dev — or verify features match the allowlist
const allowlistFeatures = deriveFromAllowlist(cfg); // tauri CLI does this
const cargoFeatures = tauriDep.features;
if (JSON.stringify(allowlistFeatures.sort()) !== JSON.stringify([...cargoFeatures].sort())) {
throw new Error('Cargo.toml tauri features out of sync with tauri.conf.json allowlist');
} Try / catch
try {
await cargoBuild();
} catch (e) {
if (String(e).includes('does not match the allowlist')) {
throw new Error('Run `tauri dev` or `tauri build` to regenerate the manifest');
}
throw e;
} Prevention
- Never hand-edit tauri dependency features; change the allowlist and let the CLI sync
- In CI, always build through the tauri CLI, not bare cargo build
- After changing tauri.conf.json, expect one regenerating dev/build run
When it happens
Trigger: Hand-editing Cargo.toml features for the `tauri` dependency (or inlined plugin deps) without regenerating, or editing the tauri.conf.json allowlist without running `tauri dev`/`tauri build`, during ManifestRef check.
Common situations: Manually adding/removing features like `protocol-asset`, using `cargo add tauri --features ...` directly, or CI running plain `cargo build` after a config change without invoking the tauri CLI.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Cargo manifest must have the `package.version` field
- The ` ` dependency features on the `Cargo.toml` file does…
- Cargo project does not have a version
- Failed to install Cargo dependency
- Failed to remove Cargo dependency
AI-assisted analysis of tauri-apps/tauri@460ec35447 (2026-09-18).
Data as JSON: /api/errors/1b0df3146cb549a0.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tauri-build/src/manifest.rs:72
.filter(|f| f != &"tray-icon")
.map(|f| f.to_string())
.collect::<Vec<String>>(),
},
];
for metadata in dependencies {
let mut name = metadata.name.clone();
let mut deps = find_dependency(manifest, &metadata.name, metadata.kind);
if deps.is_empty() {
if let Some(alias) = &metadata.alias {
deps = find_dependency(manifest, alias, metadata.kind);
name.clone_from(alias);
}
}
for dep in deps {
if let Err(error) = check_features(dep, &metadata) {
return Err(anyhow!("
The `{}` dependency features on the `Cargo.toml` file does not match the allowlist defined under `tauri.conf.json`.
Please run `tauri dev` or `tauri build` or {}.
", name, error));
}
}
}
Ok(())
}
fn find_dependency(manifest: &mut Manifest, name: &str, kind: DependencyKind) -> Vec<Dependency> {
let dep = match kind {
DependencyKind::Build => manifest.build_dependencies.remove(name),
DependencyKind::Normal => manifest.dependencies.remove(name),
};
if let Some(dep) = dep {
vec![dep]View on GitHub (pinned to 460ec35447)