{"record":{"id":"43f7c6a707f60405","repo":"Zackriya-Solutions/meetily","slug":"failed-to-create-http-client","errorCode":null,"errorMessage":"Failed to create HTTP client: {}","messagePattern":"Failed to create HTTP client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":871,"sourceCode":"        base_url: &str,\n        artifacts: &[ArtifactSpec],\n        active_download: &ActiveDownload,\n        progress_callback: Option<Box<dyn Fn(DownloadProgress) + Send>>,\n    ) -> Result<(DownloadProgress, Option<Box<dyn Fn(DownloadProgress) + Send>>)> {\n        if active_download.cancellation.is_cancelled() {\n            return Err(DownloadCancelled.into());\n        }\n        fs::create_dir_all(model_dir)\n            .await\n            .map_err(|error| anyhow!(\"Failed to create model directory: {}\", error))?;\n\n        let client = reqwest::Client::builder()\n            .tcp_nodelay(true)\n            .pool_max_idle_per_host(1)\n            .timeout(Duration::from_secs(3600))\n            .connect_timeout(Duration::from_secs(30))\n            .build()\n            .map_err(|error| anyhow!(\"Failed to create HTTP client: {}\", error))?;\n        let total_bytes: u64 = artifacts.iter().map(|artifact| artifact.exact_bytes).sum();\n        let download_started = Instant::now();\n        let mut confirmed_bytes = 0u64;\n        let mut streamed_bytes = 0u64;\n        let mut bytes_since_report = 0u64;\n        let mut last_report = Instant::now();\n        let mut last_percent = 0u8;\n\n        for artifact in artifacts {\n            if active_download.cancellation.is_cancelled() {\n                return Err(DownloadCancelled.into());\n            }\n\n            let file_path = model_dir.join(artifact.filename);\n            let local_bytes = match fs::metadata(&file_path).await {\n                Ok(metadata) => metadata.len(),\n                Err(error) if error.kind() == std::io::ErrorKind::NotFound => 0,\n                Err(error) => {","sourceCodeStart":853,"sourceCodeEnd":889,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L853-L889","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Restart the app once - transient TLS init failures sometimes clear on a fresh process","Unset or fix HTTP_PROXY/HTTPS_PROXY/ALL_PROXY environment variables if they reference dead or malformed proxy URLs","On Linux, ensure the system CA certificate store is installed and healthy (update-ca-certificates / ca-certificates package)","Report the inner error text with the issue - the '{}' carries reqwest's reason and pinpoints the subsystem"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match engine.download_model(name, None).await {\n    Err(e) if e.to_string().contains(\"Failed to create HTTP client\") => {\n        // environment problem (TLS/proxy): prompt restart, ask user to check proxy env vars,\n        // and report the inner reqwest error - retrying unchanged will not help\n        return Err(anyhow!(\"network stack unavailable: {e}\"));\n    }\n    other => other?,\n}","preventionTips":["Keep the OS CA certificate store healthy (update-ca-certificates / OS updates)","Avoid malformed HTTP_PROXY/HTTPS_PROXY env vars on machines running the app","Capture the inner error string in bug reports - it identifies TLS vs configuration failures"],"tags":["parakeet","reqwest","http-client","tls","proxy"],"backgroundTag":"http-client-init-failed","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}