{"record":{"id":"a80930eaf364b861","repo":"zed-industries/zed","slug":"windows-sandboxing-via-wsl-is-unavailable","errorCode":null,"errorMessage":"Windows sandboxing via WSL is unavailable: {}","messagePattern":"Windows sandboxing via WSL is unavailable: (.+?)","errorType":"exception","errorClass":"WslSandboxUnavailable","httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":200,"sourceCode":"\n    /// The reason, without the leading [`WSL_SANDBOX_UNAVAILABLE_PREFIX`].\n    #[cfg(test)]\n    pub fn message(&self) -> &str {\n        &self.0\n    }\n}\n\nimpl std::fmt::Display for WslSandboxUnavailable {\n    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {\n        write!(f, \"{WSL_SANDBOX_UNAVAILABLE_PREFIX}: {}\", self.0)\n    }\n}\n\nimpl std::error::Error for WslSandboxUnavailable {}\n\n/// Shorthand for an [`anyhow::Error`] wrapping a [`WslSandboxUnavailable`].\nfn unavailable(message: impl Into<String>) -> anyhow::Error {\n    anyhow::Error::new(WslSandboxUnavailable::new(message))\n}\n\n#[derive(Clone, Debug, Eq, Hash, PartialEq)]\nstruct WslPath {\n    distro: Option<String>,\n    path: String,\n}\n\n/// A path mapped for use inside WSL.\n///\n/// WSL UNC and WSL-absolute paths can be mapped structurally up front. Native\n/// drive-letter paths depend on the distro's automount configuration\n/// (`/etc/wsl.conf` can move the `/mnt` root), so they are translated with\n/// `wslpath` inside the distro — but a distro can only be chosen after every\n/// path has been parsed (WSL UNC paths pin one), hence this two-stage shape:\n/// parse structurally first, then resolve native paths via [`resolve_paths`]\n/// once the distro is known.\n#[derive(Clone, Debug, Eq, Hash, PartialEq)]","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L182-L218","documentation":"Sentinel error type WslSandboxUnavailable raised by the `unavailable` helper throughout windows_wsl.rs whenever the WSL-based Windows sandbox cannot operate: WSL not installed, no suitable distro, missing zed helper binary, probe failures, or command execution errors. The message carries the specific reason after the WSL_SANDBOX_UNAVAILABLE_PREFIX.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:200 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install WSL (`wsl --install`) and a default Linux distro","Run `wsl --update` to get a compatible kernel","Reinstall or repair the zed WSL helper binary inside the distro","Fall back to running without the Windows sandbox if WSL is unavailable"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}