ramensoftware/windhawk · warning

the mod cannot be stored in an archive, so it was not…

Error message

the mod cannot be stored in an archive, so it was not exported ({e})

What it means

During user-data export, each mod entry is validated with domain::user_data::validate_mod before being written to the archive. If the entry violates a mod format rule (e.g. bad id or version format), it is dropped and this warning is recorded instead of aborting the whole export. The intent is that one malformed mod cannot break export of the remaining mods and app settings.

Solutions

  1. Read the warnings array from the export result to find which mod id failed and why
  2. Fix the mod's id/version fields to match the required format (id unique, version matching the @version scheme)
  3. Re-run the export; the mod will be included once validate_mod passes
  4. If the mod is unneeded or unsalvageable, delete it from user data and export again

Example fix

// before: invalid version in stored mod config
"version": "latest"
// after
"version": "1.2.3"
Defensive patterns

Strategy: validation

Validate before calling

// rust-ish pre-check mirroring domain rules
if let Err(e) = domain::user_data::validate_mod(&archive_mod) {
    fix_or_skip_mod(id, e);
}

Prevention

When it happens

Trigger: Calling export (via export_mod) when a stored mod entry fails validate_mod — typically because its id or version string does not match the required format rules for archive entries.

Common situations: Manually edited mod metadata or config where the mirrored @version or id was changed to something invalid; imports from older/other Windhawk versions with looser validation; corrupted user data files.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of ramensoftware/windhawk@61d99ed8e1 (2026-09-12). Data as JSON: /api/errors/60d4a7b2606759a1. Report an issue: GitHub.

Appendix: source

Thrown at src/windhawk-core/core/src/services/user_data.rs:271

    let archive_mod = ArchiveMod {
        mod_id: id.to_owned(),
        version,
        name,
        source: if embed { source_text } else { None },
        settings,
        config,
    };

    // An archive is read back whole - `deserialize` fails the entire document on
    // the first violation, with no per-mod tolerance - and the entry is built
    // from state nothing upstream constrains: the storage id is a source file
    // name or a config key, and the version is the source's `@version` or the
    // config's mirror of it. An entry that breaks a format rule is dropped here
    // rather than left to take the other mods and the app settings down with it
    // at read time. The archive-wide rules (format tag, unique ids, an object
    // `appSettings`) hold by construction in `export`.
    if let Err(e) = domain::user_data::validate_mod(&archive_mod) {
        warnings.push(warn(
            id,
            format!("the mod cannot be stored in an archive, so it was not exported ({e})"),
        ));
        return Ok(None);
    }

    Ok(Some(archive_mod))
}

/// The mod's runtime settings, canonicalized to the source-declared types and
/// emitted in the source's flattened declaration order, or `None` (with a
/// warning) when the source is missing or will not parse.
fn canonical_settings(
    session: &SessionInner,
    language: &str,
    id: &str,
    source_text: Option<&str>,
    warnings: &mut Vec<ExportWarning>,

View on GitHub (pinned to 61d99ed8e1)