Problem
Any TLS connection (specifically the Mattermost channel adapter's wss:// WebSocket) causes a tokio worker thread panic:
thread 'tokio-rt-worker' panicked at rustls-0.23.37/src/crypto/mod.rs:249:14:
Could not automatically determine the process-level CryptoProvider from Rustls crate features.
Call CryptoProvider::install_default() before this point to select a provider manually,
or make sure exactly one of the 'aws-lc-rs' and 'ring' features is enabled.
After enough panics accumulate (~50), the process exits. This happens on every startup when [channels.mattermost] is configured with an https:// server URL.
Environment
- v0.5.4 and v0.5.5 Linux x86_64 binaries (both affected)
- Docker on Ubuntu 22.04
- Config has
[channels.mattermost] with server_url = "https://chat.example.com"
Root cause
Cargo.toml uses rustls-tls feature for reqwest and rustls-tls-native-roots for tokio-tungstenite, but rustls 0.23+ requires an explicit CryptoProvider to be installed before any TLS operations. The binary doesn't call CryptoProvider::install_default() at startup.
Suggested fix
Add this early in main(), before any async runtime or TLS connections:
rustls::crypto::ring::default_provider().install_default().ok();
Or ensure the ring crate feature is enabled for rustls in Cargo.toml so it auto-installs.
Workaround
Remove [channels.mattermost] from config.toml entirely. This disables native Mattermost DM-to-agent chat but avoids the panic. Slash commands via an external bridge still work.
Problem
Any TLS connection (specifically the Mattermost channel adapter's wss:// WebSocket) causes a tokio worker thread panic:
After enough panics accumulate (~50), the process exits. This happens on every startup when
[channels.mattermost]is configured with anhttps://server URL.Environment
[channels.mattermost]withserver_url = "https://chat.example.com"Root cause
Cargo.toml uses
rustls-tlsfeature for reqwest andrustls-tls-native-rootsfor tokio-tungstenite, but rustls 0.23+ requires an explicit CryptoProvider to be installed before any TLS operations. The binary doesn't callCryptoProvider::install_default()at startup.Suggested fix
Add this early in main(), before any async runtime or TLS connections:
Or ensure the
ringcrate feature is enabled for rustls in Cargo.toml so it auto-installs.Workaround
Remove
[channels.mattermost]from config.toml entirely. This disables native Mattermost DM-to-agent chat but avoids the panic. Slash commands via an external bridge still work.