Hmbown/CodeWhale · error · anyhow::Error

browser opening is unsupported on this platform

Error message

browser opening is unsupported on this platform

What it means

Compile-time platform guard in browser_open_command: the current build target is not one of the supported platforms (macOS, Linux/BSD family, Windows), so no known browser-opening command exists. This is a static fallback, not a runtime failure of a command.

Source

Thrown at crates/tui/src/utils.rs:552

    }

    #[cfg(target_os = "windows")]
    {
        let mut cmd = Command::new("cmd");
        cmd.args(["/C", "start", "", url]);
        Ok(cmd)
    }

    #[cfg(not(any(
        target_os = "macos",
        all(target_os = "linux", not(target_env = "ohos")),
        target_os = "windows",
        target_os = "netbsd",
        target_os = "freebsd",
        target_os = "openbsd",
        target_os = "dragonfly"
    )))]
    Err(anyhow::anyhow!(
        "browser opening is unsupported on this platform"
    ))
}

/// Spawn a tokio task with panic supervision.
///
/// Wraps the future in `AssertUnwindSafe` + `catch_unwind`. On panic:
/// 1. Logs the panic with the task name and caller location via `tracing::error!`.
/// 2. Writes a crash dump to `~/.codewhale/crashes/<timestamp>-<name>.log`.
///
/// The returned `JoinHandle` resolves to `()` — the panic is caught and
/// handled internally so the parent process stays alive.
pub fn spawn_supervised<F>(
    name: &'static str,
    location: &'static std::panic::Location<'static>,
    future: F,
) -> tokio::task::JoinHandle<()>
where

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Print the URL to the terminal so the user can open it manually.
  2. Extend browser_open_command with an opener command for the target platform.
  3. Contribute platform detection (e.g. via xdg-open conventions) to cover the unsupported environment.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/tui/src/utils.rs:552 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/540278896e8ae433. Report an issue: GitHub.