{"record":{"id":"a61bc07dda2b2ae9","repo":"tauri-apps/tauri","slug":"permission-not-found-expected-one-of","errorCode":null,"errorMessage":"Permission {} not found, expected one of {}","messagePattern":"Permission (.+?) not found, expected one of (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-build/src/acl.rs","lineNumber":388,"sourceCode":"        let mut available_permissions = Vec::new();\n        for (key, manifest) in acl_manifests {\n          let prefix = if key == APP_ACL_KEY {\n            \"\".to_string()\n          } else {\n            format!(\"{key}:\")\n          };\n          if manifest.default_permission.is_some() {\n            available_permissions.push(format!(\"{prefix}default\"));\n          }\n          for p in manifest.permissions.keys() {\n            available_permissions.push(format!(\"{prefix}{p}\"));\n          }\n          for p in manifest.permission_sets.keys() {\n            available_permissions.push(format!(\"{prefix}{p}\"));\n          }\n        }\n\n        anyhow::bail!(\n          \"Permission {} not found, expected one of {}\",\n          permission_id.get(),\n          available_permissions.join(\", \")\n        );\n      }\n    }\n  }\n\n  Ok(())\n}\n\npub fn build(out_dir: &Path, target: Target, attributes: &Attributes) -> super::Result<()> {\n  let mut acl_manifests = read_plugins_manifests()?;\n\n  let app_acl = app_manifest_permissions(\n    out_dir,\n    attributes.app_manifest,\n    &attributes.inlined_plugins,","sourceCodeStart":370,"sourceCodeEnd":406,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-build/src/acl.rs#L370-L406","documentation":"tauri-build's ACL validation (validate_capabilities) fails when a capability file references a permission_id that does not exist in any known plugin's or core's permission manifest. The error lists every available permission so the developer can correct the identifier. This is a build-time gate: bad ACL references would otherwise silently produce a mis-permissioned app.","triggerScenarios":"A `permissions` entry in src-tauri/capabilities/*.json names a permission (e.g. \"fs:read-file\" vs actual \"fs:read-file\" casing/path variants, or a plugin not installed) that no manifest declares; validate_capabilities runs during tauri build / build().","commonSituations":"Typo'd permission identifiers; referencing a plugin permission without adding the plugin as a dependency; permission renamed in a plugin upgrade; wrong `identifier` prefix (missing `plugin-name:` or extra prefix); hand-editing capability JSON.","solutions":["Copy the exact identifier from the 'expected one of' list printed by the error into your capability file","Add the plugin as a dependency in Cargo.toml/package.json so its permission manifest is registered","Check for renames after upgrading a plugin — update capability files to the new permission names","Fix the prefix format in the permission id (plugin-name:permission-name, core permissions use core: prefixes)"],"exampleFix":"// before (src-tauri/capabilities/default.json)\n\"permissions\": [\"fs:readfile\", \"shell-open\"]\n// after\n\"permissions\": [\"fs:read-file\", \"shell:allow-open\"]","handlingStrategy":"validation","validationCode":"const KNOWN: &[&str] = &[\"core:default\", \"shell:allow-open\", \"fs:read-file\", \"opener:default\"];\nfn permissions_valid(perms: &[String]) -> bool {\n  perms.iter().all(|p| KNOWN.contains(&p.as_str()))\n}","typeGuard":null,"tryCatchPattern":"// tauri_build::build() returns Result — fail the build script with context:\nif let Err(e) = tauri_build::try_build(attrs) {\n  eprintln!(\"ACL validation failed: {e}\");\n  std::process::exit(1);\n}","preventionTips":["Copy permission identifiers from plugin docs / the error's 'expected one of' list, never hand-type them","Add the corresponding plugin dependency before referencing its permissions","After upgrading plugins, diff permission names in capability files","Run `tauri build` (or `cargo build` in src-tauri) early to catch ACL typos"],"tags":["tauri","acl","permissions","capabilities","build"],"backgroundTag":"resource-not-found","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"}