ramensoftware/windhawk · warning
the mod could not be loaded, so it was not exported
Error message
the mod could not be loaded, so it was not exported ({}) What it means
This is not a hard failure but a warning emitted during mod-settings export: a mod present in the current scope failed to load, so it cannot be exported and is skipped with a warning naming the underlying load error. The export continues for all other mods; the warning is scoped via ModScope, so locally-installed mods may be excluded from reporting depending on the scope (e.g. AllExceptLocal filters them out).
Solutions
- Read the embedded load_error.error in the warning to identify why the mod failed to load, then fix that root cause (reinstall or repair the mod).
- Remove or repair the broken mod so the export no longer references it.
- Narrow the export scope (e.g. ModScope::Ids with only healthy mods, or AllExceptLocal) to skip unloadable mods intentionally.
- Re-run the export after fixing; treat the warnings list as the record of what was skipped.
Example fix
// before: export blindly, mod fails to load
let result = export(ModScope::Keyword(ModScopeKeyword::All));
// after: ensure mods load before export, or scope to healthy ids
let healthy: Vec<ModId> = mods.iter().filter(|m| m.load_error.is_none()).map(|m| m.id.clone()).collect();
let result = export(ModScope::Ids { ids: healthy }); Defensive patterns
Strategy: try-catch
Validate before calling
let broken: Vec<&ModId> = load_errors.iter().filter(|e| in_scope(e)).map(|e| &e.mod_id).collect();
if !broken.is_empty() { /* repair or rescope before export */ } Try / catch
match export(scope) {
Ok(r) if r.warnings.is_empty() => r,
Ok(r) => { for w in &r.warnings { log::warn!("skipped: {w}"); } r },
Err(e) => { log::error!("export failed: {e}"); fallback_export()? }
} Prevention
- Validate mod loadability before export and repair or rescope unloadable mods.
- Keep the mods directory consistent (no dangling references after uninstall).
- Treat export warnings as actionable: review them on every export.
- Prefer explicit ModScope::Ids for automated pipelines so failures are deterministic.
When it happens
Trigger: Calling the public export function while a mod referenced by the selected ModScope has a load error recorded (e.g. the mod file is missing, corrupt, or failed to initialize), and the scope check (scope_matches) returns true for that mod's id.
Common situations: Exporting settings on a machine where a mod was uninstalled or renamed but is still referenced; a mod failed to compile/load after a Windhawk or engine update; a partially-copied mods directory; exporting with ModScope::All for a corrupted third-party mod.
Related errors
- MODS_LOAD_FAILED
- Failed to load metadata for mod
- {}: {}
- the mod has no recorded version, so it was not exported
- the mod's source , so it was not exported
AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12).
Data as JSON: /api/errors/ae691956d0aa0c8b.
Report an issue: GitHub.
Appendix: source
Thrown at src/windhawk-core/core/src/services/user_data.rs:152
// invisible to the loop above; surface it as a warning when a keyword scope
// would have included it, so a backup is never silently missing a mod. A
// load-errored mod that still has a listing entry (a config-derived entry
// whose source failed to parse) flows through `export_mod`, which warns on
// its own terms; an explicit id naming a load-errored mod is a selection
// error (`resolve_scope`).
for load_error in &list.load_errors {
if list.mods.contains_key(&load_error.mod_id) {
continue;
}
let in_scope = match &selection.mods {
ModScope::Keyword(ModScopeKeyword::All) => true,
ModScope::Keyword(ModScopeKeyword::AllExceptLocal) => {
!ModId::str_is_local(&load_error.mod_id)
}
ModScope::Keyword(ModScopeKeyword::None) | ModScope::Ids { .. } => false,
};
if in_scope {
warnings.push(warn(
&load_error.mod_id,
format!(
"the mod could not be loaded, so it was not exported ({})",
load_error.error
),
));
}
}
let archive = UserDataArchive {
format: FORMAT_TAG.to_owned(),
app_settings: app_settings_out,
mods,
};
to_value_result(
"exportUserData",
&ExportUserDataResult {View on GitHub (pinned to 61d99ed8e1)