tinyhumansai/openhuman · error · anyhow::Error

No active native browser session. Run browser action='open'

Error message

No active native browser session. Run browser action='open' first

What it means

Sentinel from active_client in the native backend: no WebDriver client is connected because no browser session was opened yet (or the previous session died). The session field is Option; every element-taking action routes through this accessor and fails until action='open' initialises it.

Source

Thrown at src/openhuman/tools/impl/browser/native_backend.rs:379

            builder.capabilities(capabilities);
        }

        let client = builder
            .connect(webdriver_url)
            .await
            .with_context(|| {
                format!(
                    "Failed to connect to WebDriver at {webdriver_url}. Start chromedriver/geckodriver first"
                )
            })?;

        self.client = Some(client);
        Ok(())
    }

    fn active_client(&self) -> Result<&Client> {
        self.client.as_ref().ok_or_else(|| {
            anyhow::anyhow!("No active native browser session. Run browser action='open' first")
        })
    }
}

fn webdriver_endpoint_reachable(webdriver_url: &str, timeout: Duration) -> bool {
    let parsed = match reqwest::Url::parse(webdriver_url) {
        Ok(url) => url,
        Err(_) => return false,
    };

    if parsed.scheme() != "http" && parsed.scheme() != "https" {
        return false;
    }

    let host = match parsed.host_str() {
        Some(h) if !h.is_empty() => h,
        _ => return false,
    };

View on GitHub (pinned to 7491200858)

Solutions

  1. Run browser action='open' with a url before element actions
  2. Re-open the session if the previous one crashed or was closed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/native_backend.rs:379 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/0ed00aeda9c8383a. Report an issue: GitHub.