BloopAI/vibe-kanban · error
unsupported URL scheme: {http_url}
Error message
unsupported URL scheme: {http_url} What it means
http_to_ws_url converts an http:// or https:// base URL into its ws:// or wss:// WebSocket equivalent. Any URL without one of those two prefixes cannot be translated and is rejected, since the target scheme would be ambiguous.
Source
Thrown at crates/relay-tunnel-core/src/lib.rs:28
///
/// Increases the stream window size and write timeout over the defaults (256 KB / 10s)
/// to handle large HTTP responses over slow connections without triggering write timeouts.
pub(crate) fn yamux_config() -> YamuxConfig {
YamuxConfig {
max_stream_window_size: 1024 * 1024, // 1 MB (default: 256 KB)
connection_write_timeout: Duration::from_secs(30), // (default: 10s)
..Default::default()
}
}
/// Convert an HTTP(S) URL to its WebSocket equivalent (ws:// or wss://).
pub fn http_to_ws_url(http_url: &str) -> anyhow::Result<String> {
if let Some(rest) = http_url.strip_prefix("https://") {
Ok(format!("wss://{rest}"))
} else if let Some(rest) = http_url.strip_prefix("http://") {
Ok(format!("ws://{rest}"))
} else {
anyhow::bail!("unsupported URL scheme: {http_url}")
}
}
View on GitHub (pinned to 4deb7eca8f)
Solutions
- Prefix the configured URL with 'http://' or 'https://' before calling
- Validate the URL scheme at configuration load time
- If the input may already be a ws URL, normalize/strip 'ws://' / 'wss://' first
Example fix
// before
let ws = http_to_ws_url("relay.example.com")?; // bails
// after
let ws = http_to_ws_url("https://relay.example.com")?; // "wss://relay.example.com" Defensive patterns
Strategy: validation
Validate before calling
if !url.starts_with("http://") && !url.starts_with("https://") { panic!("relay server URL must start with http:// or https://"); } Try / catch
let ws_url = http_to_ws_url(cfg.server_url).map_err(|e| ConfigError::InvalidServerUrl(e.to_string()))?;
Prevention
- Validate configured URLs at startup, not at call time
- Include scheme in example config/env var docs
- Normalize inputs by auto-prefixing https:// when scheme missing
When it happens
Trigger: Calling http_to_ws_url with a URL missing a scheme (e.g. 'localhost:8080' or 'example.com'), or with a non-HTTP scheme like 'ftp://' or an already-ws URL.
Common situations: Config value for the relay server URL written without 'http://' prefix; user pasted a 'wss://' URL into an http-only setting; env var defaults lacking the scheme.
Related errors
- This host is not paired with your browser. Pair it in Relay
- No setup script configured for this project
- No cleanup script configured for this project
- No archive script configured for this project
- Failed to load orchestrator MCP context from /api/containers
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/2dfa557b35c2b7de.
Report an issue: GitHub.