Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CryptoProvider error. #3619

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

vgobbo
Copy link
Contributor

@vgobbo vgobbo commented Jan 22, 2025

When running dx serve, the following error happens since axum-server version 0.7 and rustls version 0.23.13.

thread 'tokio-runtime-worker' panicked at /home/vgobbo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.21/src/crypto/mod.rs:249:14:
no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::option::expect_failed
   3: rustls::server::server_conn::ServerConfig::builder_with_protocol_versions
   4: rustls::server::server_conn::ServerConfig::builder
   5: axum_server::tls_rustls::config_from_der
   6: axum_server::tls_rustls::config_from_pem
   7: dx::serve::server::devserver_mainloop::{{closure}}
   8: tokio::runtime::task::core::Core<T,S>::poll
   9: tokio::runtime::task::harness::Harness<T,S>::poll
  10: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
  11: tokio::runtime::scheduler::multi_thread::worker::Context::run
  12: tokio::runtime::context::runtime::enter_runtime
  13: tokio::runtime::scheduler::multi_thread::worker::run
  14: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll

As suggested in the bug axum-server#153, the workaround for this is to add feature tls-rustls-no-provider to axum-server, and add ring to rustls (not needed since the top-level Cargo.toml already does this).

@vgobbo vgobbo requested a review from a team as a code owner January 22, 2025 00:20
@jkelleyrtp jkelleyrtp merged commit ce2b223 into DioxusLabs:main Jan 22, 2025
17 checks passed
@jkelleyrtp
Copy link
Member

Thank yoU!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants