hatoo/oha · error · anyhow::Error
Your Oha instance has not been built with HTTP/3 support…
Error message
Your Oha instance has not been built with HTTP/3 support. Try recompiling with the feature enabled.
What it means
`--http-version 3` (or 3.0) maps to HTTP/3, which is gated behind the optional `http3` cargo feature. When the binary was compiled without that feature, the 3.x arm bails with this message instead of producing an HTTP/3 version. The binary runs fine otherwise; only HTTP/3 is unavailable.
Solutions
- Rebuild oha with the http3 feature enabled: `cargo install oha --features http3` (or build from source with that feature).
- Use a build/distribution known to include HTTP/3 support.
- Fall back to HTTP/2 (`--http-version 2`) if HTTP/3 is not essential.
Example fix
// before cargo install oha oha --http-version 3 https://example.com // after cargo install oha --features http3 oha --http-version 3 https://example.com
Defensive patterns
Strategy: fallback
Validate before calling
fn http3_supported(build_features: &[&str]) -> bool {
build_features.contains(&"http3")
} Try / catch
match run(opts).await {
Err(e) if e.to_string().contains("not been built with HTTP/3 support") => {
eprintln!("Falling back to HTTP/2");
opts.http_version = Some("2".into());
run(opts).await
}
Err(e) => return Err(e),
Ok(v) => v,
} Prevention
- Install oha with `cargo install oha --features http3` if you need HTTP/3.
- Detect the binary's feature set (help output or a probe run) before scripting --http-version 3.
- Keep a fallback to HTTP/2 in load-test scripts.
When it happens
Trigger: Running an oha binary built without `--features http3` and passing `--http-version 3` or `--http-version 3.0`.
Common situations: Installing oha from a package manager or prebuilt binary that omits the http3 feature; CI environments using a default build.
Related errors
- Invalid AWS credentials format. Expected…
- AWS credentials (--auth) required when using --aws-sigv4
- --http2 and --http-version are exclusive
- Unknown HTTP version. Valid versions are 0.9, 1.0, 1.1, 2, 3
- Both --cert and --key must be specified
AI-assisted analysis of hatoo/oha@4efba2d113 (2026-09-09).
Data as JSON: /api/errors/e4c94e76c3f5db7c.
Report an issue: GitHub.
Appendix: source
Thrown at src/main.rs:383
} else {
anyhow::bail!("AWS credentials (--auth) required when using --aws-sigv4");
}
} else {
None
};
let parse_http_version = |is_http2: bool, version: Option<&str>| match (is_http2, version) {
(true, Some(_)) => anyhow::bail!("--http2 and --http-version are exclusive"),
(true, None) => Ok(http::Version::HTTP_2),
(false, Some(http_version)) => match http_version.trim() {
"0.9" => Ok(http::Version::HTTP_09),
"1.0" => Ok(http::Version::HTTP_10),
"1.1" => Ok(http::Version::HTTP_11),
"2.0" | "2" => Ok(http::Version::HTTP_2),
#[cfg(feature = "http3")]
"3.0" | "3" => Ok(http::Version::HTTP_3),
#[cfg(not(feature = "http3"))]
"3.0" | "3" => anyhow::bail!(
"Your Oha instance has not been built with HTTP/3 support. Try recompiling with the feature enabled."
),
_ => anyhow::bail!("Unknown HTTP version. Valid versions are 0.9, 1.0, 1.1, 2, 3"),
},
(false, None) => Ok(http::Version::HTTP_11),
};
let http_version: http::Version = parse_http_version(opts.http2, opts.http_version.as_deref())?;
let proxy_http_version: http::Version =
parse_http_version(opts.proxy_http2, opts.proxy_http_version.as_deref())?;
let url_generator = if opts.rand_regex_url {
// Almost URL has dot in domain, so disable dot in regex for convenience.
let dot_disabled: String = url
.chars()
.map(|c| {
if c == '.' {
regex_syntax::escape(".")View on GitHub (pinned to 4efba2d113)