DioxusLabs/dioxus · error
Failed to install default CryptoProvider: {provider:?}
Error message
Failed to install default CryptoProvider: {provider:?} What it means
Initialization guard in devserver_mainloop (called from start): when HTTPS is enabled the server must install a default rustls CryptoProvider before constructing the TLS acceptor, and that process-level installation failed (e.g. no provider features enabled or a conflicting prior install). The input at fault is the CryptoProvider whose installation attempt is reported.
Source
Thrown at packages/cli/src/serve/server.rs:443
listener: TcpListener,
router: Router,
) -> Result<()> {
// We have a native listener that we're going to give to tokio, so we need to make it non-blocking
let _ = listener.set_nonblocking(true);
// If we're not using rustls, just use regular axum
if https_cfg.enabled != Some(true) {
axum::serve(
tokio::net::TcpListener::from_std(listener).unwrap(),
router.into_make_service(),
)
.await?;
return Ok(());
}
// If we're using rustls, we need to install the provider, get the cert/key paths, and then set up rustls
if let Err(provider) = CryptoProvider::install_default(default_provider()) {
bail!("Failed to install default CryptoProvider: {provider:?}");
}
let (cert_path, key_path) = get_rustls(&https_cfg).await?;
let rustls = axum_server::tls_rustls::RustlsConfig::from_pem_file(cert_path, key_path).await?;
axum_server::from_tcp_rustls(listener, rustls)
.serve(router.into_make_service())
.await?;
Ok(())
}
/// Sets up and returns a router
///
/// Steps include:
/// - Setting up cors
/// - Setting up the proxy to the endpoint specified in the config
/// - Setting up the file serve service
/// - Setting up the websocket endpoint for devtoolsView on GitHub (pinned to 24f6a829df)
Solutions
- No rustls CryptoProvider could be installed. Enable a provider feature (e.g. ring) or install one explicitly before use.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/cli/src/serve/server.rs:443 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23).
Data as JSON: /api/errors/5a5dac4a7ac6e1a3.
Report an issue: GitHub.