{"record":{"id":"4632a85556bd55b6","repo":"tauri-apps/tauri","slug":"unknown-attribute-name","errorCode":null,"errorMessage":"unknown attribute {name}","messagePattern":"unknown attribute (.+?)","errorType":"validation","errorClass":"syn::Error","httpStatus":null,"severity":"error","filePath":"crates/tauri-macros/src/context.rs","lineNumber":110,"sourceCode":"                ));\n              }\n            }\n            \"assets\" => {\n              assets.replace(v.value);\n            }\n            \"test\" => {\n              if let Expr::Lit(ExprLit {\n                lit: Lit::Bool(LitBool { value, .. }),\n                ..\n              }) = v.value\n              {\n                test = value;\n              } else {\n                return Err(syn::Error::new(input.span(), \"unexpected value for test\"));\n              }\n            }\n            name => {\n              return Err(syn::Error::new(\n                input.span(),\n                format!(\"unknown attribute {name}\"),\n              ));\n            }\n          }\n        }\n        Meta::List(_) => {\n          return Err(syn::Error::new(input.span(), \"unexpected list input\"));\n        }\n      }\n\n      let _ = input.parse::<Token![,]>();\n    }\n\n    Ok(Self {\n      config_file: config_file\n        .unwrap_or_else(|| {\n          std::env::var(\"CARGO_MANIFEST_DIR\")","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-macros/src/context.rs#L92-L128","documentation":"A compile-time error from `tauri::generate_context!`. The macro only recognizes the name-value attributes `capabilities`, `assets`, and `test` (plus a bare path for the root and a leading config file string). Any other attribute name aborts compilation with this message naming the offending attribute.","triggerScenarios":"Passing an unsupported key like `config = ...`, `dev = ...`, or a misspelled `capabilites = [...]` inside `generate_context!`.","commonSituations":"Typos in attribute names; confusing generate_context! options with tauri.conf.json fields; using options from an older or newer Tauri version.","solutions":["Fix the attribute spelling; only capabilities, assets, and test are supported","Remove the attribute and set the equivalent option in tauri.conf.json","Check the Tauri version's generate_context! documentation for supported options"],"exampleFix":"// before\ntauri::generate_context!(\"tauri.conf.json\", capabilites = [\"default\"])\n// after\ntauri::generate_context!(\"tauri.conf.json\", capabilities = [\"default\"])","handlingStrategy":"validation","validationCode":"// Only these macro attribute names are accepted\nconst ALLOWED: &[&str] = &[\"capabilities\", \"assets\", \"test\"];\nassert!(ALLOWED.contains(&ATTR_NAME), \"unsupported generate_context! attribute\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Autocomplete from the tauri crate docs when writing macro options","Put configuration in tauri.conf.json rather than ad-hoc macro attributes","Grep existing working invocations in the repo before adding new attributes"],"tags":["compile-time","macro","unknown-attribute","typo"],"backgroundTag":"invalid-argument","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"}