BigPizzaV3/CodexPlusPlus · error · anyhow::Error

opening DevTools URL is not supported on this platform

Error message

opening DevTools URL is not supported on this platform

What it means

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.

Solutions

  1. Run on a supported platform (Windows, macOS, or Linux/other unix) — the DevTools opener is only implemented for those.
  2. 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.
  3. If a new platform is genuinely needed, add a cfg branch implementing the URL-open for it in the same helper.

Example fix

// before (unsupported target)
anyhow::bail!("opening DevTools URL is not supported on this platform")
// after: build for a supported target
cargo build --target x86_64-unknown-linux-gnu -p codex-plus-launcher
Defensive patterns

Strategy: fallback

Validate before calling

fn devtools_supported() -> bool {
    cfg!(any(windows, target_os = "macos", unix))
}

Type guard

fn is_supported_target() -> bool {
    cfg!(any(windows, target_os = "macos", unix))
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/1ff5ff2ac680ce80. Report an issue: GitHub.

Appendix: source

Thrown at apps/codex-plus-launcher/src/main.rs:1110

            .arg(url)
            .spawn()
            .map(|_| ())
            .map_err(|error| anyhow::anyhow!("failed to open DevTools URL: {error}"))
    }

    #[cfg(all(unix, not(target_os = "macos")))]
    {
        std::process::Command::new("xdg-open")
            .arg(url)
            .spawn()
            .map(|_| ())
            .map_err(|error| anyhow::anyhow!("failed to open DevTools URL: {error}"))
    }

    #[cfg(not(any(windows, target_os = "macos", unix)))]
    {
        let _ = url;
        anyhow::bail!("opening DevTools URL is not supported on this platform")
    }
}

fn default_user_script_manager() -> UserScriptManager {
    let config_dir = default_user_scripts_config_dir();
    UserScriptManager::new(
        builtin_user_scripts_dir(),
        config_dir.join("user_scripts"),
        config_dir.join("user_scripts.json"),
    )
}

fn default_user_scripts_config_dir() -> PathBuf {
    if cfg!(windows) {
        if let Some(roaming) = std::env::var_os("APPDATA") {
            return PathBuf::from(roaming).join("Codex++");
        }
        if let Some(home) = directories::BaseDirs::new().map(|dirs| dirs.home_dir().to_path_buf()) {

View on GitHub (pinned to b1ed92e5e4)