jdx/mise · error
Failed to parse schema JSON: {}
Error message
Failed to parse schema JSON: {} What it means
head_async_with_headers issues HTTP HEAD requests (commonly for checking artifact existence/size) and, like all network methods on this client, first ensures offline mode is disabled. If the `offline` setting is on, it throws "offline mode is enabled" without sending the request.
Source
Thrown at crates/mise-interactive-config/build.rs:63
let repo_schema = manifest_dir
.parent()
.unwrap()
.parent()
.unwrap()
.join("schema/mise.json");
let schema_path = if local_schema.exists() {
local_schema
} else {
repo_schema
};
println!("cargo:rerun-if-changed={}", schema_path.display());
let schema_content = fs::read_to_string(&schema_path)
.unwrap_or_else(|e| panic!("Failed to read schema at {}: {}", schema_path.display(), e));
let schema: Value = serde_json::from_str(&schema_content)
.unwrap_or_else(|e| panic!("Failed to parse schema JSON: {}", e));
let defs = schema.get("$defs");
// Extract top-level properties and classify them
let mut sections = Vec::new();
let mut entries = Vec::new(); // (name, description, type)
if let Some(properties) = schema.get("properties").and_then(|p| p.as_object()) {
for (name, prop) in properties {
// Skip deprecated and internal properties
if prop
.get("deprecated")
.and_then(|d| d.as_bool())
.unwrap_or(false)
{
continue;
}
if name == "_" {View on GitHub (pinned to afd2eddd3a)
Solutions
- Turn off offline mode: `mise settings set offline false` or unset MISE_OFFLINE
- Set `offline = false` in mise.toml [settings]
- Skip install operations needing remote checks; use locally installed versions
Example fix
// before # settings.toml [settings] offline = true // after [settings] offline = false
Defensive patterns
Strategy: try-catch
Validate before calling
mise settings get offline # must print false before HEAD checks
Try / catch
match client.head_async_with_headers(url, &headers).await {
Err(e) if e.to_string().contains("offline mode") => assume_artifact_absent_or_cached(),
r => r?,
} Prevention
- Ensure offline=false before install flows that HEAD-check assets
- Keep offline mode off in CI jobs that download tools
- Skip HEAD probes when offline and rely on cache
When it happens
Trigger: Calling head_async_with_headers while Settings::get().offline() is true — e.g. a backend probing a download URL during install with MISE_OFFLINE=1 exported.
Common situations: Tool installation flows that HEAD-check release assets running on a machine/env where offline mode was enabled to speed up or lock down mise.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- cannot encode #{value.class} as JSON
- Failed to read schema at {}: {}
- cli feature is not enabled
- should not be called for system tool
- Got HTML instead of text from {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/65f515de210c4471.
Report an issue: GitHub.