{"record":{"id":"d6f135ac4447b6c2","repo":"BloopAI/vibe-kanban","slug":"failed-to-install-rustls-crypto-provider-d6f135","errorCode":null,"errorMessage":"Failed to install rustls crypto provider","messagePattern":"Failed to install rustls crypto provider","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"crates/review/src/main.rs","lineNumber":106,"sourceCode":"\nfn create_spinner(message: &str) -> ProgressBar {\n    let spinner = ProgressBar::new_spinner();\n    spinner.set_style(\n        ProgressStyle::default_spinner()\n            .template(\"{spinner:.green} {msg}\")\n            .expect(\"Invalid spinner template\"),\n    );\n    spinner.set_message(message.to_string());\n    spinner.enable_steady_tick(Duration::from_millis(100));\n    spinner\n}\n\n#[tokio::main]\nasync fn main() -> Result<()> {\n    // Install rustls crypto provider before any TLS operations\n    rustls::crypto::aws_lc_rs::default_provider()\n        .install_default()\n        .expect(\"Failed to install rustls crypto provider\");\n\n    let args = Args::parse();\n\n    // Initialize tracing\n    let filter = if args.verbose {\n        EnvFilter::new(\"debug\")\n    } else {\n        EnvFilter::new(\"warn\")\n    };\n    tracing_subscriber::fmt().with_env_filter(filter).init();\n\n    println!(\"{}\", BANNER);\n\n    show_disclaimer();\n\n    debug!(\"Args: {:?}\", args);\n\n    // Run the main flow and handle errors","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/review/src/main.rs#L88-L124","documentation":"Same rustls family as error 164: install_default() fails if a process-wide crypto provider was already installed. The review CLI's main expects success and panics with \"Failed to install rustls crypto provider\" when another provider was previously installed.","triggerScenarios":"`main` in crates/review runs and install_default() returns Err because a rustls CryptoProvider (ring or another aws-lc-rs install) was already installed earlier in the process, e.g. by a dependency or a repeated invocation in tests.","commonSituations":"Dependency tree containing multiple rustls crypto providers that each install at startup; test harnesses calling main more than once; version changes where a library began installing its own provider.","solutions":["Use try_install_default() and ignore AlreadyInstalled instead of expect","Unify on one crypto provider across Cargo features (aws-lc-rs preferred) and drop conflicting TLS features","In tests, install the provider once via a std::sync::Once guard"],"exampleFix":"// before\nrustls::crypto::aws_lc_rs::default_provider().install_default().expect(\"Failed to install rustls crypto provider\");\n// after\nif rustls::crypto::aws_lc_rs::default_provider().try_install_default().is_err() {\n    tracing::debug!(\"rustls crypto provider already installed\");\n}","handlingStrategy":"try-catch","validationCode":"// use try_install_default and inspect Result instead of pre-checking","typeGuard":null,"tryCatchPattern":"if let Err(e) = rustls::crypto::aws_lc_rs::default_provider().install_default() {\n    // AlreadyInstalled is fine; otherwise warn\n    eprintln!(\"rustls provider install skipped: {e}\");\n}","preventionTips":["Use try_install_default() and ignore AlreadyInstalled","Unify TLS backend features across the dependency tree","Install the provider exactly once via a shared Once helper"],"tags":["rust","panic","rustls","tls"],"backgroundTag":"rustls-crypto-provider-conflict","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}