Zackriya-Solutions/meetily · error

Failed to create HTTP client

Error message

Failed to create HTTP client: {}

What it means

Returned by download_model_detailed when reqwest::Client::builder()...build() fails. The builder here sets tcp_nodelay, a 1-hour total timeout, a 30-second connect timeout, and a connection pool; build() practically only fails when the TLS backend cannot initialize (certificate store/proxy configuration problems) or the builder options are invalid for the environment.

Solutions

  1. Restart the app once - transient TLS init failures sometimes clear on a fresh process
  2. Unset or fix HTTP_PROXY/HTTPS_PROXY/ALL_PROXY environment variables if they reference dead or malformed proxy URLs
  3. On Linux, ensure the system CA certificate store is installed and healthy (update-ca-certificates / ca-certificates package)
  4. Report the inner error text with the issue - the '{}' carries reqwest's reason and pinpoints the subsystem
Defensive patterns

Strategy: try-catch

Try / catch

match engine.download_model(name, None).await {
    Err(e) if e.to_string().contains("Failed to create HTTP client") => {
        // environment problem (TLS/proxy): prompt restart, ask user to check proxy env vars,
        // and report the inner reqwest error - retrying unchanged will not help
        return Err(anyhow!("network stack unavailable: {e}"));
    }
    other => other?,
}

Prevention

When it happens

Trigger: Building the client on a machine where the TLS backend fails to initialize (broken system trust store, missing root certificates in a minimal container); environment proxy variables (HTTP_PROXY/HTTPS_PROXY/ALL_PROXY) pointing at an invalid URI in setups where reqwest picks them up; extremely constrained environments where allocating the pool or timers fails.

Common situations: Corporate MITM proxy with custom env configuration; running the desktop app in a hardened/minimal OS or container without ca-certificates; leftover proxy env vars from a VPN client.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/43f7c6a707f60405. Report an issue: GitHub.

Appendix: source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:871

        base_url: &str,
        artifacts: &[ArtifactSpec],
        active_download: &ActiveDownload,
        progress_callback: Option<Box<dyn Fn(DownloadProgress) + Send>>,
    ) -> Result<(DownloadProgress, Option<Box<dyn Fn(DownloadProgress) + Send>>)> {
        if active_download.cancellation.is_cancelled() {
            return Err(DownloadCancelled.into());
        }
        fs::create_dir_all(model_dir)
            .await
            .map_err(|error| anyhow!("Failed to create model directory: {}", error))?;

        let client = reqwest::Client::builder()
            .tcp_nodelay(true)
            .pool_max_idle_per_host(1)
            .timeout(Duration::from_secs(3600))
            .connect_timeout(Duration::from_secs(30))
            .build()
            .map_err(|error| anyhow!("Failed to create HTTP client: {}", error))?;
        let total_bytes: u64 = artifacts.iter().map(|artifact| artifact.exact_bytes).sum();
        let download_started = Instant::now();
        let mut confirmed_bytes = 0u64;
        let mut streamed_bytes = 0u64;
        let mut bytes_since_report = 0u64;
        let mut last_report = Instant::now();
        let mut last_percent = 0u8;

        for artifact in artifacts {
            if active_download.cancellation.is_cancelled() {
                return Err(DownloadCancelled.into());
            }

            let file_path = model_dir.join(artifact.filename);
            let local_bytes = match fs::metadata(&file_path).await {
                Ok(metadata) => metadata.len(),
                Err(error) if error.kind() == std::io::ErrorKind::NotFound => 0,
                Err(error) => {

View on GitHub (pinned to a2cb62e827)