Repository navigation
bug: Agent panics with rustls CryptoProvider error during backup upload in v1.21.2 #112
Description
Describe the bug
The Portabase agent panics and crashes during the encryption and upload phase of a backup to Cloud Storage. This issue occurs in version 1.21.2 due to an uninitialized crypto provider in the underlying rustls v0.23.44 library.
To Reproduce
Steps to reproduce the behavior:
- Configure a backup target to use a Cloud Storage destination.
- Trigger or wait for a backup execution.
- Check the agent logs during the encryption and upload phase.
- See the
tokio-rt-workerthread panic error.
Expected behavior
The backup should be encrypted and uploaded to the Cloud Storage destination successfully without crashing the agent runtime.
Screenshots
N/A (Console logs provided below)
Desktop (please complete the following information):
N/A (Backend/Agent issue)
Smartphone (please complete the following information):
N/A
Additional context
Here is the exact crash log from the agent:
2026-09-26T17:19:52 INFO Uploading file a964e06d-7acb-4532-bb45-8898e0d21db1.tar.gz.enc │
│ │
│ thread 'tokio-rt-worker' (16) panicked at /usr/local/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.44/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. │
│ See the documentation of the CryptoProvider type for more information. │
Technical details & Suggested Fix
Since rustls 0.23, a process-level CryptoProvider must be explicitly initialized, or exactly one default provider feature (ring or aws-lc-rs) must be enabled in Cargo.toml.
The crash happens because a recent dependency update brought in rustls v0.23.44, but no default crypto provider is being automatically detected or manually installed at application startup.
Possible Fixes:
- Cargo.toml: Ensure that either the
ringoraws-lc-rsfeature is explicitly enabled forrustls(or via HTTP client crates likereqwestif they manage the TLS stack). - Main entrypoint: Explicitly install a default provider at the beginning of the
main()function:rustls::crypto::ring::default_provider().install_default() .expect("Failed to install crypto provider");
- Portabase Agent Version: 1.21.2
Activity
RambokDev commentedon Sep 26, 2026
Hi @zbbfufu,
Could you try with the new agent version 1.21.3?
If the issue still persists, feel free to ask us to reopen this thread.
Regards
zbbfufu commentedon Sep 26, 2026
Hi @RambokDev
Your new version fix the issue, thanks a lot for this very quick fix !
Regards