{"record":{"id":"a97937991c845ad1","repo":"EpicGames/lore","slug":"networking-not-supported-on-this-os","errorCode":null,"errorMessage":"Networking not supported on this OS","messagePattern":"Networking not supported on this OS","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lore/src/remote/network/stub.rs","lineNumber":15,"sourceCode":"// SPDX-FileCopyrightText: 2026 Epic Games, Inc.\n// SPDX-License-Identifier: MIT\nuse crate::remote::network::UdsAcceptError;\nuse crate::remote::network::UdsConnectionError;\nuse crate::remote::network::UdsListenerError;\n\npub fn uds_supported() -> bool {\n    false\n}\n\npub struct UdsListener {}\n\nimpl UdsListener {\n    pub fn new() -> Result<UdsListener, UdsListenerError> {\n        panic!(\"Networking not supported on this OS\")\n    }\n\n    pub fn accept(&self) -> Result<UdsStream, UdsAcceptError> {\n        panic!(\"Networking not supported on this OS\")\n    }\n}\n\npub struct UdsStream {}\n\nimpl UdsStream {\n    #[allow(unreachable_code)]\n    pub fn writer(&mut self) -> &mut impl std::io::Write {\n        panic!(\"Networking not supported on this OS\");\n        Box::leak(Box::<Vec<u8>>::new(Vec::new()))\n    }\n\n    #[allow(unreachable_code)]\n    pub fn reader(&mut self) -> &mut impl std::io::Read {","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/EpicGames/lore/blob/074eb0b0d1194c997d7cf28b55519e3e197b3e23/lore/src/remote/network/stub.rs#L1-L33","documentation":"On platforms without Unix-domain-socket networking support, lore compiles a stub UdsListener whose constructor unconditionally panics. This is a deliberate compile-time platform substitution: the type exists so code compiles, but any use is a programming error on that OS.","triggerScenarios":"Calling UdsListener::new() on an OS where the networking stub (stub.rs) is selected by cfg instead of the real Unix-socket implementation.","commonSituations":"Building/running lore on Windows or another unsupported platform; accidentally enabling a Unix-socket transport feature on a target that only compiles the stub.","solutions":["Run on a supported Unix-like OS where the real UDS networking module is compiled.","Choose a transport other than Unix domain sockets (e.g. TCP) when targeting unsupported platforms.","Guard UDS code paths behind a runtime/compile-time platform check so new() is never reached on stub platforms."],"exampleFix":"// before\nlet listener = UdsListener::new()?;\n// after\n#[cfg(unix)]\nlet listener = UdsListener::new()?;\n#[cfg(not(unix))]\nreturn Err(anyhow!(\"Unix domain sockets not available on this platform\"));","handlingStrategy":"type-guard","validationCode":"if !cfg!(unix) { /* skip or use TCP transport */ }","typeGuard":"fn uds_supported() -> bool { cfg!(unix) }","tryCatchPattern":"// panic, not recoverable: prevent call instead\nif !uds_supported() { return Err(anyhow!(\"UDS unsupported here\")); }\nlet listener = UdsListener::new()?;","preventionTips":["Gate all UDS code with #[cfg(unix)].","Expose a platform-capability check for transports.","Run CI on the target OS before shipping UDS-based configs.","Default to TCP on non-Unix platforms."],"tags":["rust","networking","uds","platform","panic"],"backgroundTag":"unsupported-platform","analyzedSha":"074eb0b0d1194c997d7cf28b55519e3e197b3e23","analyzedAt":"2026-09-13T09:00:57.509Z","contentChangedAt":"2026-09-13T09:00:57.509Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}