{"record":{"id":"1ff5ff2ac680ce80","repo":"BigPizzaV3/CodexPlusPlus","slug":"opening-devtools-url-is-not-supported-on-this-platform","errorCode":null,"errorMessage":"opening DevTools URL is not supported on this platform","messagePattern":"opening DevTools URL is not supported on this platform","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"apps/codex-plus-launcher/src/main.rs","lineNumber":1110,"sourceCode":"            .arg(url)\n            .spawn()\n            .map(|_| ())\n            .map_err(|error| anyhow::anyhow!(\"failed to open DevTools URL: {error}\"))\n    }\n\n    #[cfg(all(unix, not(target_os = \"macos\")))]\n    {\n        std::process::Command::new(\"xdg-open\")\n            .arg(url)\n            .spawn()\n            .map(|_| ())\n            .map_err(|error| anyhow::anyhow!(\"failed to open DevTools URL: {error}\"))\n    }\n\n    #[cfg(not(any(windows, target_os = \"macos\", unix)))]\n    {\n        let _ = url;\n        anyhow::bail!(\"opening DevTools URL is not supported on this platform\")\n    }\n}\n\nfn default_user_script_manager() -> UserScriptManager {\n    let config_dir = default_user_scripts_config_dir();\n    UserScriptManager::new(\n        builtin_user_scripts_dir(),\n        config_dir.join(\"user_scripts\"),\n        config_dir.join(\"user_scripts.json\"),\n    )\n}\n\nfn default_user_scripts_config_dir() -> PathBuf {\n    if cfg!(windows) {\n        if let Some(roaming) = std::env::var_os(\"APPDATA\") {\n            return PathBuf::from(roaming).join(\"Codex++\");\n        }\n        if let Some(home) = directories::BaseDirs::new().map(|dirs| dirs.home_dir().to_path_buf()) {","sourceCodeStart":1092,"sourceCodeEnd":1128,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6/apps/codex-plus-launcher/src/main.rs#L1092-L1128","documentation":"This error is raised by the launcher's open_devtools helper when asked to open the DevTools URL on a platform that is not Windows, macOS, or a recognized unix variant. The function is compiled with #[cfg(not(any(windows, target_os = \"macos\", unix)))] and has no platform-specific opener available, so it deliberately bails instead of guessing. It is an intentional unsupported-platform guard, not an unexpected failure.","triggerScenarios":"Calling the DevTools-open code path (e.g. launching the manager with a DevTools flag/env) while the binary is compiled for a target OS outside {windows, macOS, unix} — e.g. wasm32, FreeRTOS-style or other non-standard targets, or a badly configured cross-compile target.","commonSituations":"Cross-compiling codex-plus-launcher for an exotic/embedded target; running tests or CI under a nonstandard target triple; a fork adding a new platform target without adding an opener branch.","solutions":["Run on a supported platform (Windows, macOS, or Linux/other unix) — the DevTools opener is only implemented for those.","Check the cargo target triple being used; rebuild for a standard target such as x86_64-unknown-linux-gnu or x86_64-pc-windows-msvc.","If a new platform is genuinely needed, add a cfg branch implementing the URL-open for it in the same helper."],"exampleFix":"// before (unsupported target)\nanyhow::bail!(\"opening DevTools URL is not supported on this platform\")\n// after: build for a supported target\ncargo build --target x86_64-unknown-linux-gnu -p codex-plus-launcher","handlingStrategy":"fallback","validationCode":"fn devtools_supported() -> bool {\n    cfg!(any(windows, target_os = \"macos\", unix))\n}","typeGuard":"fn is_supported_target() -> bool {\n    cfg!(any(windows, target_os = \"macos\", unix))\n}","tryCatchPattern":null,"preventionTips":["Only enable DevTools auto-open on supported platforms.","Gate the DevTools launch flag behind a platform check at startup.","When adding build targets, audit all cfg(not(...)) fallbacks that bail."],"tags":["platform","devtools","compile-time-cfg","launch"],"backgroundTag":"unsupported-platform","analyzedSha":"b1ed92e5e4a2d74095d4b8db5af43cef7acba9c6","analyzedAt":"2026-09-19T23:35:21.129Z","contentChangedAt":"2026-09-19T23:35:21.129Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}