jdx/mise · error
should not be called for system tool
Error message
should not be called for system tool
What it means
The file download routine (used to fetch release artifacts) checks the `offline` setting before starting any download and throws "offline mode is enabled" if enabled. Downloads also write partial files keyed by a request hash; the offline guard prevents any of that network/IO work when the user opted out of network access.
Source
Thrown at src/backend/asdf.rs:266
sm = sm.with_env(k, value);
}
for (key, value) in tv.install_env() {
sm = match value.into_string() {
Some(value) => sm.with_env(key, value),
None => sm.without_env(key),
};
}
if let Some(project_root) = &config.project_root {
let project_root = project_root.to_string_lossy().to_string();
sm = sm.with_env("MISE_PROJECT_ROOT", project_root);
}
let install_type = match &tv.request {
ToolRequest::Version { .. } | ToolRequest::Prefix { .. } => "version",
ToolRequest::Ref { .. } => "ref",
ToolRequest::Path { .. } => "path",
ToolRequest::Sub { .. } => "sub",
ToolRequest::System { .. } => {
panic!("should not be called for system tool")
}
};
let install_version = match &tv.request {
ToolRequest::Ref { ref_: v, .. } => v, // should not have "ref:" prefix
_ => &tv.version,
};
// add env vars from mise.toml files
for (key, value) in config.env().await? {
sm = sm.with_env(key, value.clone());
}
let install = tv.install_path().to_string_lossy().to_string();
let download = tv.download_path().to_string_lossy().to_string();
sm = sm
.with_env("ASDF_DOWNLOAD_PATH", &download)
.with_env("ASDF_INSTALL_PATH", &install)
.with_env("ASDF_INSTALL_TYPE", install_type)
.with_env("ASDF_INSTALL_VERSION", install_version)
.with_env("MISE_DOWNLOAD_PATH", download)View on GitHub (pinned to afd2eddd3a)
Solutions
- Disable offline mode: unset MISE_OFFLINE or `mise settings set offline false`
- Set `offline = false` in the [settings] table of your mise.toml
- Pre-download artifacts while online or point at a mirror reachable in your environment
- Use already-installed tool versions instead of installing new ones while offline
Example fix
// before # CI job env: MISE_OFFLINE: "1" steps: ["mise install node@22"] // after env: MISE_OFFLINE: "0" steps: ["mise install node@22"]
Defensive patterns
Strategy: validation
Validate before calling
# ensure offline mode is off before installing
[ "$(mise settings get offline)" = "false" ] || { echo "disable offline mode to install"; exit 1; } Try / catch
match download_result {
Err(e) if e.to_string().contains("offline mode is enabled") => Err(anyhow!("cannot download while offline; unset MISE_OFFLINE and retry")),
other => other,
} Prevention
- Pre-download tool artifacts before switching to offline mode
- Don't set MISE_OFFLINE=1 in CI jobs that install tools
- Use pre-warmed caches or internal mirrors when operating offline
When it happens
Trigger: Calling the download method (with url, destination path, headers, reporter, total_timeout) while Settings::get().offline() is true — typically during `mise install`/upgrade with offline mode set.
Common situations: Installing a new tool version on a machine with MISE_OFFLINE=1; a CI job configured offline attempting to download artifacts not in cache.
Related errors
- cannot encode #{value.class} as JSON
- Failed to read schema at {}: {}
- Failed to parse schema JSON: {}
- cli feature is not enabled
- HTTP download timed out after {} for {} (attempt {}, {} byte
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/7a0d0f5c33100b14.
Report an issue: GitHub.