{"record":{"id":"e6ab8c8fcfbb75b3","repo":"BloopAI/vibe-kanban","slug":"failed-to-install-rustls-crypto-provider-e6ab8c","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/server/src/main.rs","lineNumber":37,"sourceCode":"\n#[derive(Debug, Error)]\npub enum VibeKanbanError {\n    #[error(transparent)]\n    Io(#[from] std::io::Error),\n    #[error(transparent)]\n    Sqlx(#[from] SqlxError),\n    #[error(transparent)]\n    Deployment(#[from] DeploymentError),\n    #[error(transparent)]\n    Other(#[from] AnyhowError),\n}\n\n#[tokio::main]\nasync fn main() -> Result<(), VibeKanbanError> {\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    sentry_utils::init_once(SentrySource::Backend);\n\n    let log_level = std::env::var(\"RUST_LOG\").unwrap_or_else(|_| \"info\".to_string());\n    let filter_string = format!(\n        \"warn,server={level},services={level},db={level},executors={level},deployment={level},local_deployment={level},utils={level},embedded_ssh={level},desktop_bridge={level},relay_hosts={level},relay_client={level},relay_webrtc={level},codex_core=off\",\n        level = log_level\n    );\n    let env_filter = EnvFilter::try_new(filter_string).expect(\"Failed to create tracing filter\");\n    tracing_subscriber::registry()\n        .with(tracing_subscriber::fmt::layer().with_filter(env_filter))\n        .with(sentry_layer())\n        .init();\n\n    // Create asset directory if it doesn't exist\n    if !asset_dir().exists() {\n        std::fs::create_dir_all(asset_dir())?;\n    }","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/server/src/main.rs#L19-L55","documentation":"Same rustls provider-installation panic as errors 164/167, in the server backend binary: install_default() errors when a process-wide rustls CryptoProvider already exists, and the expect turns that into a hard crash before sentry/tracing initialization.","triggerScenarios":"`main` in crates/server runs and another rustls crypto provider was already installed (by a dependency with its own TLS setup, a ring-based provider, or duplicated startup logic), so install_default() returns Err and the process panics.","commonSituations":"Feature-flag combinations pulling both ring and aws-lc-rs backends; embedded/desktop variants of the server initializing TLS before main; a dependency upgrade that installs a default provider.","solutions":["Switch to try_install_default() and tolerate AlreadyInstalled","Audit Cargo features so only one rustls crypto backend is enabled workspace-wide","Ensure no other module installs a provider before main runs"],"exampleFix":"// before\nrustls::crypto::aws_lc_rs::default_provider().install_default().expect(\"Failed to install rustls crypto provider\");\n// after\nlet _ = rustls::crypto::aws_lc_rs::default_provider().try_install_default();","handlingStrategy":"try-catch","validationCode":"// use try_install_default and inspect Result instead of pre-checking","typeGuard":null,"tryCatchPattern":"match rustls::crypto::aws_lc_rs::default_provider().install_default() {\n    Ok(()) => {},\n    Err(_) => { /* already installed; proceed */ }\n}","preventionTips":["Prefer try_install_default() in all binaries","Audit workspace Cargo features for dual ring/aws-lc-rs backends","Ensure shared startup helpers install the provider only once"],"tags":["rust","panic","rustls","tls","server"],"backgroundTag":"rustls-crypto-provider-conflict","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}