tinyhumansai/openhuman · error

Unsupported scroll direction '{direction}'. Use up/down/left

Error message

Unsupported scroll direction '{direction}'. Use up/down/left/right

What it means

The native browser backend received a scroll action whose direction string does not match any of the four directions its match arms recognize, so no (dx, dy) pair can be computed and the action aborts before any scroll command reaches the browser client.

Source

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

                let client = self.active_client()?;
                let element = find_element(client, &selector).await?;
                hover_element(client, &element).await?;

                Ok(json!({
                    "backend": "rust_native",
                    "action": "hover",
                    "selector": selector,
                }))
            }
            BrowserAction::Scroll { direction, pixels } => {
                let client = self.active_client()?;
                let amount = i64::from(pixels.unwrap_or(600));
                let (dx, dy) = match direction.as_str() {
                    "up" => (0, -amount),
                    "down" => (0, amount),
                    "left" => (-amount, 0),
                    "right" => (amount, 0),
                    _ => anyhow::bail!(
                        "Unsupported scroll direction '{direction}'. Use up/down/left/right"
                    ),
                };

                let position = client
                    .execute(
                        "window.scrollBy(arguments[0], arguments[1]); return { x: window.scrollX, y: window.scrollY };",
                        vec![json!(dx), json!(dy)],
                    )
                    .await
                    .context("Failed to execute scroll script")?;

                Ok(json!({
                    "backend": "rust_native",
                    "action": "scroll",
                    "position": position,
                }))
            }

View on GitHub (pinned to 7491200858)

Solutions

  1. Pass one of the exact direction strings 'up', 'down', 'left' or 'right'
  2. Check the tool-call arguments for whitespace, casing or JSON typos in the direction field
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/browser/native_backend.rs:217 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/4e947ff4fa738c81. Report an issue: GitHub.