Skip to content

bug: Agent panics with rustls CryptoProvider error during backup upload in v1.21.2 #112

Closed

Description

@zbbfufu

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:

  1. Configure a backup target to use a Cloud Storage destination.
  2. Trigger or wait for a backup execution.
  3. Check the agent logs during the encryption and upload phase.
  4. See the tokio-rt-worker thread 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:

  1. Cargo.toml: Ensure that either the ring or aws-lc-rs feature is explicitly enabled for rustls (or via HTTP client crates like reqwest if they manage the TLS stack).
  2. 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

  1. RambokDev commented on Sep 26, 2026

    @RambokDev
    Contributor

    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

  2. zbbfufu commented on Sep 26, 2026

    @zbbfufu
    Author

    Hi @RambokDev

    Your new version fix the issue, thanks a lot for this very quick fix !

    Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions