jdx/mise · critical
Failed to create reqwest client
Error message
Failed to create reqwest client
What it means
The vfox crate builds a shared reqwest::Client once (LazyLock) with a user agent. If client construction fails — which for a default ClientBuilder essentially only happens with broken TLS backend initialization — this expect panics at first use. It indicates the HTTP stack itself is unusable in this environment.
Source
Thrown at crates/vfox/src/http.rs:12
use reqwest::header::HeaderMap;
use reqwest::{Client, ClientBuilder, StatusCode, Url};
use std::sync::Arc;
use std::sync::LazyLock;
use std::time::Duration;
use tokio::sync::watch;
pub(crate) static CLIENT: LazyLock<Client> = LazyLock::new(|| {
ClientBuilder::new()
.user_agent(format!("vfox.rs/{}", env!("CARGO_PKG_VERSION")))
.build()
.expect("Failed to create reqwest client")
});
pub(crate) const URL_REWRITER_REGISTRY_KEY: &str = "url_rewriter_fn";
pub(crate) const HTTP_HEADERS_RESOLVER_REGISTRY_KEY: &str = "http_headers_resolver_fn";
pub(crate) type HttpHeadersResolver = Arc<dyn Fn(&Url) -> HeaderMap + Send + Sync>;
static HTTP_CANCELLATION: LazyLock<HttpCancellation> = LazyLock::new(Default::default);
#[derive(Clone)]
pub(crate) struct HttpCancellation {
signal: watch::Sender<()>,
}
pub(crate) struct HttpCancellationReceiver {
signal: watch::Receiver<()>,
}
impl Default for HttpCancellation {View on GitHub (pinned to afd2eddd3a)
Solutions
- Fix the system TLS: reinstall/repair OpenSSL (e.g. apt install libssl3 / apk add openssl) and CA certificates (ca-certificates)
- Reinstall mise with a prebuilt binary matching your platform (avoids broken local TLS linkage)
- Check LD_LIBRARY_PATH for conflicting libssl/libcrypto versions
- Report the environment (OS, mise version, mise doctor output) if it persists
Example fix
// before (Debian/Ubuntu, missing TLS) mise install vfox-plugin // after sudo apt-get install -y libssl3 ca-certificates mise install vfox-plugin
Defensive patterns
Strategy: try-catch
Try / catch
// LazyLock panics on failure; verify TLS availability in deployment checks ldd "$(which mise)" | grep -E 'libssl|libcrypto' || echo 'check TLS libs'
Prevention
- Install CA certificates and OpenSSL on minimal/container images
- Prefer official prebuilt mise binaries over locally built ones on exotic platforms
- Re-check LD_LIBRARY_PATH in CI images after base image upgrades
When it happens
Trigger: First HTTP use in the vfox plugin runtime triggers LazyLock initialization; ClientBuilder::build() fails, almost always due to TLS backend (native-tls/openssl) load failures — missing/incorrect OpenSSL libraries, musl/static-link issues, or corrupt SSL cert configuration.
Common situations: Linux systems with missing libssl versions after upgrades; Alpine/musl builds without proper TLS; container images stripped of CA certificates or OpenSSL; LD_LIBRARY_PATH pointing to incompatible libs.
Related errors
- retry loop should always return
- cloned request builder should remain cloneable
- attestation requests must not have a streaming body
- missing arg order for {}
- remote action manifest ETag does not match its body
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/20315b6cfa148e37.
Report an issue: GitHub.