mikedilger / relay-tester

nostr relay tester
MIT License
13 stars 2 forks source link

CryptoProvider error #8

Open Dolu89 opened 1 month ago

Dolu89 commented 1 month ago

Hey I'm on macos m1 arch, I don't know if it's related, but I got this error when trying to launch the program

*** CONNECTING ***
thread 'main' panicked at /Users/dolu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.12/src/crypto/mod.rs:259:14:
no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I fixed the error by doing this https://github.com/rustls/rustls/issues/1938#issuecomment-2099920256

mikedilger commented 1 month ago

woah. Ok I'll look into this later. Glad you found a fix for yourself.

mikedilger commented 1 month ago

This is a bit weird since we don't directly depend on rustls. We depend on other crates which themselves depend on rustls. We shouldn't have to do this, and if it has to be done it should be done by the upstream crates (reqwest, tokio-tungstenite)

https://github.com/seanmonstar/reqwest/issues/2423

This is where tungstenite clobbered the NECESSARY rustls choice between aws-lc-rs and ring by clobbering both features:

https://github.com/snapview/tungstenite-rs/commit/0e25483753f76b542a98052078149490ea12e69e