{"record":{"id":"9cb219e6045c48c0","repo":"ramensoftware/windhawk","slug":"failed-to-load-metadata-for-mod","errorCode":null,"errorMessage":"Failed to load metadata for mod '{}': {}","messagePattern":"Failed to load metadata for mod '(.+?)': (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/windhawk-core/cli/src/commands/mod.rs","lineNumber":49,"sourceCode":"pub(crate) fn language(settings: &AppSettings) -> String {\n    if settings.language.is_empty() {\n        \"en\".to_owned()\n    } else {\n        settings.language.clone()\n    }\n}\n\n/// Whether update checks are enabled (`!disableUpdateCheck`), gating the\n/// installed-state update flag, mirroring the GUI.\npub(crate) fn check_for_updates(settings: &AppSettings) -> bool {\n    !settings.disable_update_check\n}\n\n/// Emit a stderr warning for each mod whose metadata failed to load, shared by\n/// `mod list` and `repo list` so the two listings cannot drift in the wording.\npub(crate) fn warn_load_errors(env: &Environment, result: &ListInstalledModsResult) {\n    for load_error in &result.load_errors {\n        env.logger.warn(&format!(\n            \"Failed to load metadata for mod '{}': {}\",\n            load_error.mod_id, load_error.error\n        ));\n    }\n}\n","sourceCodeStart":31,"sourceCodeEnd":55,"githubUrl":"https://github.com/ramensoftware/windhawk/blob/61d99ed8e182e1af1b60109612b6763ad1b4b74e/src/windhawk-core/cli/src/commands/mod.rs#L31-L55","documentation":"warn_load_errors in windhawk-core CLI (commands/mod.rs) emits a stderr warning for each installed mod whose metadata failed to load, shared by `mod list` and `repo list` so wording stays consistent. It is not a thrown error: the listing continues, but the message flags that some mods will be missing or incomplete in the output because their metadata could not be parsed/loaded.","triggerScenarios":"ListInstalledModsResult.load_errors is non-empty after enumerating installed mods: a mod's metadata file is missing, corrupted, or fails schema/version parsing during `wh-cli mod list` or `repo list`.","commonSituations":"A partially uninstalled or manually edited mod directory; metadata format changed between Windhawk versions leaving older files unparsable; interrupted write leaving truncated metadata on disk.","solutions":["Inspect the mod directory named in the warning; fix or restore its metadata file.","Reinstall the affected mod so its metadata is regenerated from a good source.","If the format changed, upgrade (or reinstall at matching version) so the CLI's parser matches the metadata on disk.","Remove the broken mod entry if it is no longer needed, then re-run the listing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before running `wh-cli mod list`, verify metadata parses:\nfor m in ~/.local/share/windhawk/mods/*/; do\n  test -f \"$m/metadata.h\" || echo \"missing metadata: $m\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Uninstall mods only through the CLI/app so metadata is removed cleanly.","Keep Windhawk and its mods at compatible versions to avoid metadata format drift.","Avoid hand-editing mod metadata files.","Reinstall any mod reported in load_errors before relying on `mod list` output."],"tags":["rust","cli","mods","metadata","warning"],"backgroundTag":"mod-metadata-load-failed","analyzedSha":"61d99ed8e182e1af1b60109612b6763ad1b4b74e","analyzedAt":"2026-09-12T14:02:41.115Z","contentChangedAt":"2026-09-12T14:02:41.115Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}