{"record":{"id":"26591bb17a5ce447","repo":"tauri-apps/tauri","slug":"failed-to-resolve-acl","errorCode":null,"errorMessage":"failed to resolve ACL","messagePattern":"failed to resolve ACL","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tauri-codegen/src/context.rs","lineNumber":417,"sourceCode":"    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();\n\n  let resolved = Resolved::resolve(&acl, capabilities, target).expect(\"failed to resolve ACL\");\n\n  let acl_tokens = map_lit(\n    quote! { ::std::collections::BTreeMap },\n    &acl,\n    str_lit,\n    identity,\n  );\n\n  let runtime_authority = quote!(#root::runtime_authority!(#acl_tokens, #resolved));\n\n  let plugin_global_api_scripts = if config.app.with_global_tauri {\n    if let Some(scripts) = tauri_utils::plugin::read_global_api_scripts(&out_dir) {\n      let scripts = scripts.into_iter().map(|s| quote!(#s));\n      quote!(::std::option::Option::Some(&[#(#scripts),*]))\n    } else {\n      quote!(::std::option::Option::None)\n    }\n  } else {","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/tauri-apps/tauri/blob/52e4b6e71d8632a7e648f866c442e287ecddee34/crates/tauri-codegen/src/context.rs#L399-L435","documentation":"Build-time panic in tauri-codegen when merging the ACL: Resolved::resolve(&acl, capabilities, target).expect(\"failed to resolve ACL\") fails when the app's capabilities cannot be resolved against the plugin manifests in acl-manifests.json — typically a permission that no manifest defines, an unknown permission-set entry, or permission scoping (platform/target/remote rules) that cannot be satisfied.","triggerScenarios":"A capability file in src-tauri/capilities/*.json listing a permission identifier that does not exist (typo), a permission of a plugin removed from Cargo.toml, a permission with scope/remote-url constraints that conflict with the capability, or a stale acl-manifests.json after adding/removing plugins without a clean rebuild.","commonSituations":"Copying a capability file from another project whose plugin set differs; upgrading a plugin that renamed/removed a permission; typos like `core:webview:defualt`; adding a plugin but building against a cached manifest map.","solutions":["Read the full build log just above the panic — Tauri names the exact capability and permission that failed to resolve","Check every permission listed in src-tauri/capabilities/*.json against the plugin's permissions/ folder (or its docs) and fix typos, renames, and removed permissions","Confirm the plugin providing each permission is still a dependency: `cargo tree | grep <plugin>`","cargo clean after adding/removing plugins so acl-manifests.json is regenerated","Verify each capability's `platforms`/`windows` fields are consistent with the permissions used"],"exampleFix":"// src-tauri/capabilities/default.json — before\n\"permissions\": [\"core:webview:defualt\"]\n\n// after\n\"permissions\": [\"core:webview:default\"]","handlingStrategy":"validation","validationCode":"// CI unit test: resolve the ACL with real error messages instead of a codegen panic\n#[test]\nfn acls_resolve() {\n    let acl = read_acl_manifests();          // parse OUT_DIR/acl-manifests.json\n    let caps = read_capabilities();          // parse OUT_DIR/capabilities.json\n    tauri_utils::acl::resolved::Resolved::resolve(&acl, caps, target)\n        .expect(\"ACL resolution must succeed — the panic in codegen hides this error\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat permission identifiers like code: review every entry in capabilities/*.json against the plugin's permissions folder","Clean the build after adding or removing plugins","When upgrading plugins, check their changelogs for renamed or removed permissions"],"tags":["acl","capabilities","permissions","build"],"backgroundTag":"acl-permission-not-found","analyzedSha":"52e4b6e71d8632a7e648f866c442e287ecddee34","analyzedAt":"2026-08-20T13:59:20.734Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}