jdx/mise · error
unsupported package plugin ownership state version
Error message
unsupported package plugin ownership state version {} in {} What it means
Package plugins persist an 'ownership state' file recording which packages they installed, tagged with a schema version. When loading that state, if the file's `schema_version` differs from the version this mise build understands (`STATE_SCHEMA_VERSION`), mise refuses to interpret it rather than guessing at an older/newer layout. This protects against silently misreading a state file written by a different mise version.
Solutions
- Align mise versions between the environments that touch the state file (upgrade the older mise, or downgrade the writer).
- Delete the stale ownership state file shown in the message so mise regenerates it; be aware previously plugin-installed packages may need reinstalling via the plugin.
- If only one plugin is affected, reinstall its packages through the plugin to rewrite state at the current schema version.
- Report the version pair if a same-versioned mise wrote an unexpected schema (bug).
Example fix
# Inspect and reset the incompatible state file mise_path=$(mise where 2>/dev/null); cat <path from error message> rm <path from error message> # mise will recreate it at the current schema version mise install # reinstall plugin packages to rebuild ownership state
Defensive patterns
Strategy: validation
Validate before calling
// Compare the state file's schema_version with the current mise's before operations
import { readFileSync } from 'node:fs';
const state = JSON.parse(readFileSync(statePath, 'utf8'));
if (state.schema_version !== CURRENT_STATE_SCHEMA_VERSION) {
console.warn(`State ${statePath} written at schema ${state.schema_version}; align mise versions or delete the file`);
} Type guard
const hasKnownSchema = (s) => typeof s?.schema_version === 'number' && s.schema_version === CURRENT_STATE_SCHEMA_VERSION;
Try / catch
try { await misePluginInstall(plugin) } catch (e) { if (String(e).includes('unsupported package plugin ownership state version')) { const p = e.message.match(/state version \d+ in (\S+)/)?.[1]; rmSync(p); await misePluginInstall(plugin); } else throw e; } Prevention
- Keep the same mise version across machines/users sharing a HOME or state directory.
- After downgrading mise, delete regenerated-cache/state files rather than expecting old schemas to load.
- Avoid running dev/beta mise builds against state later read by stable builds.
- Back up state files before mise major upgrades.
When it happens
Trigger: Calling any package-plugin operation that loads ownership state (install/uninstall/prune/status flows via `load_state_at`) after the on-disk state file was written by a mise version with a different `STATE_SCHEMA_VERSION`.
Common situations: Downgrading mise after the state schema changed; syncing a shared/home-directory state file between machines with different mise versions; a beta or dev build wrote a newer schema that a stable build then reads.
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
- package plugin ownership state
- cannot merge lockfile version
- conflicting pypi. and pipx. settings
- incompatible monorepo lockfile formats; run `mise lock…
- is not available: required binary ' ' not found; add it to…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/eee59500e24a0cd0.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/packages/plugin.rs:146
}
fn load_state_at(path: &std::path::Path, manager: &str) -> Result<PackagePluginState> {
if !path.exists() {
return Ok(PackagePluginState {
schema_version: STATE_SCHEMA_VERSION,
manager: manager.to_string(),
packages: BTreeMap::new(),
});
}
let state: PackagePluginState = serde_json::from_str(&crate::file::read_to_string(path)?)
.wrap_err_with(|| {
format!(
"failed to read package plugin ownership state {}",
crate::file::display_path(path)
)
})?;
if state.schema_version != STATE_SCHEMA_VERSION {
bail!(
"unsupported package plugin ownership state version {} in {}",
state.schema_version,
crate::file::display_path(path)
);
}
if state.manager != manager {
bail!(
"package plugin ownership state {} belongs to manager '{}', not '{manager}'",
crate::file::display_path(path),
state.manager
);
}
Ok(state)
}
fn load_state(&self) -> Result<PackagePluginState> {
Self::load_state_at(&self.state_path(), &self.name)
}View on GitHub (pinned to 533346cc37)