{"record":{"id":"e4c94e76c3f5db7c","repo":"hatoo/oha","slug":"your-oha-instance-has-not-been-built-with-http-3-s","errorCode":null,"errorMessage":"Your Oha instance has not been built with HTTP/3 support. Try recompiling with the feature enabled.","messagePattern":"Your Oha instance has not been built with HTTP/3 support\\. Try recompiling with the feature enabled\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":383,"sourceCode":"        } else {\n            anyhow::bail!(\"AWS credentials (--auth) required when using --aws-sigv4\");\n        }\n    } else {\n        None\n    };\n\n    let parse_http_version = |is_http2: bool, version: Option<&str>| match (is_http2, version) {\n        (true, Some(_)) => anyhow::bail!(\"--http2 and --http-version are exclusive\"),\n        (true, None) => Ok(http::Version::HTTP_2),\n        (false, Some(http_version)) => match http_version.trim() {\n            \"0.9\" => Ok(http::Version::HTTP_09),\n            \"1.0\" => Ok(http::Version::HTTP_10),\n            \"1.1\" => Ok(http::Version::HTTP_11),\n            \"2.0\" | \"2\" => Ok(http::Version::HTTP_2),\n            #[cfg(feature = \"http3\")]\n            \"3.0\" | \"3\" => Ok(http::Version::HTTP_3),\n            #[cfg(not(feature = \"http3\"))]\n            \"3.0\" | \"3\" => anyhow::bail!(\n                \"Your Oha instance has not been built with HTTP/3 support. Try recompiling with the feature enabled.\"\n            ),\n            _ => anyhow::bail!(\"Unknown HTTP version. Valid versions are 0.9, 1.0, 1.1, 2, 3\"),\n        },\n        (false, None) => Ok(http::Version::HTTP_11),\n    };\n\n    let http_version: http::Version = parse_http_version(opts.http2, opts.http_version.as_deref())?;\n    let proxy_http_version: http::Version =\n        parse_http_version(opts.proxy_http2, opts.proxy_http_version.as_deref())?;\n\n    let url_generator = if opts.rand_regex_url {\n        // Almost URL has dot in domain, so disable dot in regex for convenience.\n        let dot_disabled: String = url\n            .chars()\n            .map(|c| {\n                if c == '.' {\n                    regex_syntax::escape(\".\")","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/hatoo/oha/blob/4efba2d113d165aaaf7533f5d2893e7cc57ebfc1/src/main.rs#L365-L401","documentation":"`--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.","triggerScenarios":"Running an oha binary built without `--features http3` and passing `--http-version 3` or `--http-version 3.0`.","commonSituations":"Installing oha from a package manager or prebuilt binary that omits the http3 feature; CI environments using a default build.","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."],"exampleFix":"// before\ncargo install oha\noha --http-version 3 https://example.com\n// after\ncargo install oha --features http3\noha --http-version 3 https://example.com","handlingStrategy":"fallback","validationCode":"fn http3_supported(build_features: &[&str]) -> bool {\n    build_features.contains(&\"http3\")\n}","typeGuard":null,"tryCatchPattern":"match run(opts).await {\n    Err(e) if e.to_string().contains(\"not been built with HTTP/3 support\") => {\n        eprintln!(\"Falling back to HTTP/2\");\n        opts.http_version = Some(\"2\".into());\n        run(opts).await\n    }\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["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."],"tags":["http3","compile-time-feature","cli","build-configuration"],"backgroundTag":"feature-not-enabled","analyzedSha":"4efba2d113d165aaaf7533f5d2893e7cc57ebfc1","analyzedAt":"2026-09-09T16:24:23.306Z","contentChangedAt":"2026-09-09T16:24:23.306Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}