jdx/mise · error
unsupported remote cache directory version
Error message
unsupported remote cache directory version
What it means
Each remote directory blob carries a version field; the restore walker only understands version 1. If a directory blob declares any other version, mise bails because its parsing and validation rules may not apply to that format.
Solutions
- Upgrade mise to a version that supports the directory format version present in the remote store.
- Purge the incompatible cache entries (or the whole remote cache) and repopulate with the current mise version.
- Align the custom cache producer on version 1 of the RemoteDirectory schema.
- Pin the team to one mise version so all writers and readers agree on the format.
Example fix
// before
{"version": 2, "directories": [], ...}
// after
{"version": 1, "directories": [], ...} Defensive patterns
Strategy: validation
Validate before calling
if (blob.version !== 1) throw new Error(`unsupported directory version: ${blob.version}`); Type guard
const isV1 = (b) => b?.version === 1;
Prevention
- Keep all cache writers and readers on the same mise version.
- Purge the remote cache when upgrading to a format change.
- Reject blobs with unknown version fields at write time.
When it happens
Trigger: get_blob returns a directory blob whose `version` field is not exactly 1 — e.g. a blob written by a newer mise or a custom producer using a different schema version.
Common situations: Remote cache populated by a newer/other tool version with an evolved on-disk format; hand-written blobs with a wrong or missing-defaulted version field; mixed-version cache stores.
Related errors
- cached rustc output directory has unsupported entries
- unsupported remote cache client metadata version
- checkpoint was written by a newer mise (schema )
- invalid remote task cache key
- remote cache directory contains duplicate names
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/d28796e30a6aee34.
Report an issue: GitHub.
Appendix: source
Thrown at src/task/task_cache_store.rs:723
}
async fn materialize_remote_tree(
store: &HttpTaskCacheStore,
root: &CacheDigest,
) -> Result<tempfile::NamedTempFile> {
let mut pending = vec![(PathBuf::new(), root.clone(), BTreeSet::new())];
let mut nodes = BTreeMap::<PathBuf, RestoredNode>::new();
while let Some((path, digest, mut ancestors)) = pending.pop() {
if !ancestors.insert(digest.clone()) {
bail!("remote cache directory graph contains a cycle");
}
let bytes = store.client.get_blob(&digest, DIRECTORY_MEDIA_TYPE).await?;
let directory: RemoteDirectory = serde_json::from_slice(&bytes)?;
if canonical_json(&serde_json::to_value(&directory)?)? != bytes {
bail!("remote cache directory is not canonical JSON");
}
if directory.version != 1 {
bail!("unsupported remote cache directory version");
}
let mut names = BTreeSet::new();
for directory in directory.directories {
validate_cache_name(&directory.name)?;
if !names.insert(directory.name.clone()) {
bail!("remote cache directory contains duplicate names");
}
let child = path.join(&directory.name);
validate_cache_path(&child)?;
nodes.insert(
child.clone(),
RestoredNode::Directory {
mode: directory.mode,
},
);
pending.push((child, directory.digest, ancestors.clone()));
}
for file in directory.files {View on GitHub (pinned to 533346cc37)