{"record":{"id":"65f515de210c4471","repo":"jdx/mise","slug":"failed-to-parse-schema-json","errorCode":null,"errorMessage":"Failed to parse schema JSON: {}","messagePattern":"Failed to parse schema JSON: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/mise-interactive-config/build.rs","lineNumber":63,"sourceCode":"    let repo_schema = manifest_dir\n        .parent()\n        .unwrap()\n        .parent()\n        .unwrap()\n        .join(\"schema/mise.json\");\n    let schema_path = if local_schema.exists() {\n        local_schema\n    } else {\n        repo_schema\n    };\n\n    println!(\"cargo:rerun-if-changed={}\", schema_path.display());\n\n    let schema_content = fs::read_to_string(&schema_path)\n        .unwrap_or_else(|e| panic!(\"Failed to read schema at {}: {}\", schema_path.display(), e));\n\n    let schema: Value = serde_json::from_str(&schema_content)\n        .unwrap_or_else(|e| panic!(\"Failed to parse schema JSON: {}\", e));\n\n    let defs = schema.get(\"$defs\");\n\n    // Extract top-level properties and classify them\n    let mut sections = Vec::new();\n    let mut entries = Vec::new(); // (name, description, type)\n\n    if let Some(properties) = schema.get(\"properties\").and_then(|p| p.as_object()) {\n        for (name, prop) in properties {\n            // Skip deprecated and internal properties\n            if prop\n                .get(\"deprecated\")\n                .and_then(|d| d.as_bool())\n                .unwrap_or(false)\n            {\n                continue;\n            }\n            if name == \"_\" {","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/crates/mise-interactive-config/build.rs#L45-L81","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\n# settings.toml\n[settings]\noffline = true\n\n// after\n[settings]\noffline = false","handlingStrategy":"try-catch","validationCode":"mise settings get offline  # must print false before HEAD checks","typeGuard":null,"tryCatchPattern":"match client.head_async_with_headers(url, &headers).await {\n    Err(e) if e.to_string().contains(\"offline mode\") => assume_artifact_absent_or_cached(),\n    r => r?,\n}","preventionTips":["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"],"tags":["network","offline","http"],"backgroundTag":"network-request-failed","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}