BloopAI/vibe-kanban · critical

Failed to install rustls crypto provider

Error message

Failed to install rustls crypto provider

What it means

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.

Source

Thrown at crates/review/src/main.rs:106

fn create_spinner(message: &str) -> ProgressBar {
    let spinner = ProgressBar::new_spinner();
    spinner.set_style(
        ProgressStyle::default_spinner()
            .template("{spinner:.green} {msg}")
            .expect("Invalid spinner template"),
    );
    spinner.set_message(message.to_string());
    spinner.enable_steady_tick(Duration::from_millis(100));
    spinner
}

#[tokio::main]
async fn main() -> Result<()> {
    // Install rustls crypto provider before any TLS operations
    rustls::crypto::aws_lc_rs::default_provider()
        .install_default()
        .expect("Failed to install rustls crypto provider");

    let args = Args::parse();

    // Initialize tracing
    let filter = if args.verbose {
        EnvFilter::new("debug")
    } else {
        EnvFilter::new("warn")
    };
    tracing_subscriber::fmt().with_env_filter(filter).init();

    println!("{}", BANNER);

    show_disclaimer();

    debug!("Args: {:?}", args);

    // Run the main flow and handle errors

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Use try_install_default() and ignore AlreadyInstalled instead of expect
  2. Unify on one crypto provider across Cargo features (aws-lc-rs preferred) and drop conflicting TLS features
  3. In tests, install the provider once via a std::sync::Once guard

Example fix

// before
rustls::crypto::aws_lc_rs::default_provider().install_default().expect("Failed to install rustls crypto provider");
// after
if rustls::crypto::aws_lc_rs::default_provider().try_install_default().is_err() {
    tracing::debug!("rustls crypto provider already installed");
}
Defensive patterns

Strategy: try-catch

Validate before calling

// use try_install_default and inspect Result instead of pre-checking

Try / catch

if let Err(e) = rustls::crypto::aws_lc_rs::default_provider().install_default() {
    // AlreadyInstalled is fine; otherwise warn
    eprintln!("rustls provider install skipped: {e}");
}

Prevention

When it happens

Trigger: `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.

Common situations: 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.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/d6f135ac4447b6c2. Report an issue: GitHub.