{"record":{"id":"7c2c269b30ee1584","repo":"jdx/mise","slug":"incompatibility-was-identified","errorCode":null,"errorMessage":"incompatibility was identified","messagePattern":"incompatibility was identified","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1009,"sourceCode":"            ))\n        } else {\n            validate_default_binary_compatibility(session, &local, &platform.os)\n                .await\n                .err()\n                .map(|error| format!(\"{error:#}\"))\n        };\n        if local_incompatibility.is_none() {\n            local\n        } else {\n            artifacts\n                .resolve(&platform, &local)\n                .await\n                .wrap_err_with(|| {\n                    format!(\n                        \"local mise could not run on remote host '{}' ({}) because {}; official mise {} artifact fallback also failed\",\n                        session.host.name,\n                        platform.description(),\n                        local_incompatibility.expect(\"incompatibility was identified\"),\n                        env!(\"CARGO_PKG_VERSION\"),\n                    )\n                })?\n        }\n    };\n    let remote = match &session.host.install_mise {\n        // A dry run stays inside the staging directory it already cleans up.\n        Some(install_mise) if dry_run => {\n            let target = resolve_remote_install_path(session, install_mise).await?;\n            info!(\"would install mise to {} on {}\", target, session.host.name);\n            stage_mise(session, &binary, staging).await?\n        }\n        Some(install_mise) => {\n            let target = resolve_remote_install_path(session, install_mise).await?;\n            install_remote_mise(session, &binary, &target).await?;\n            target\n        }\n        None => stage_mise(session, &binary, staging).await?,","sourceCodeStart":991,"sourceCodeEnd":1027,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/remote.rs#L991-L1027","documentation":"In remote session setup, when both the local-mise attempt and the official artifact fallback fail, the error message unwraps `local_incompatibility.expect(\"incompatibility was identified\")`. The invariant is that this branch is only reachable when a local incompatibility was previously detected and stored; a panic means the failure branch was entered without recording that cause.","triggerScenarios":"Reaching the dual-failure error path at src/system/remote.rs:1009 (local mise fails to run on the remote AND the official mise artifact fallback fails) when `local_incompatibility` was never set — e.g. a code path reports failure for a reason other than detected incompatibility (network error, auth failure).","commonSituations":"SSH/network failures misclassified as incompatibility; remote mise binary present but broken (bad ELF, wrong arch) causing the local attempt to fail without an incompatibility record; mise artifact download blocked by a proxy, hitting the fallback-failure branch.","solutions":["Check why the local mise run failed on the remote (permissions, arch, missing libs) — the panic masks the root cause","Verify the official mise artifact is downloadable from the remote (network/proxy/firewall)","Change the code to fall back to a generic message when local_incompatibility is None"],"exampleFix":"// before\nlocal_incompatibility.expect(\"incompatibility was identified\"),\n// after\nlocal_incompatibility.as_deref().unwrap_or(\"no incompatibility recorded\"),","handlingStrategy":"fallback","validationCode":"// pre-check before remote setup\nssh host 'uname -m' && curl -fsSL https://mise.jdx.dev/mise-latest-$(uname -s)-$(uname -m) -o /dev/null","typeGuard":null,"tryCatchPattern":"let cause = local_incompatibility.as_deref()\n    .unwrap_or(\"local mise failed without a recorded incompatibility\");","preventionTips":["Ensure the remote has network access to download official mise artifacts","Verify remote arch/OS is supported by the local mise binary","Pre-install a compatible mise on the remote host to skip both fallbacks"],"tags":["panic","invariant","remote","mise-install"],"backgroundTag":"internal-invariant-violation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}