Skip to content

Feishu WebSocket crashes on Windows with rustls CryptoProvider panic #315

@Caosmart1979

Description

@Caosmart1979

Bug Description

When enabling the Feishu channel with WebSocket long connection on Windows (x86_64), microclaw starts successfully, authenticates with Feishu (bot open_id returned), but then panics when attempting to establish the WebSocket connection:

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.

Environment

  • Platform: Windows 11 Home China 10.0.22631
  • Arch: x86_64
  • Version: v0.1.31
  • Binary: pre-built Windows x86_64 from GitHub releases

Configuration

channels:
  feishu:
    enabled: true
    default_account: main
    accounts:
      main:
        app_id: cli_xxx
        app_secret: xxx
        domain: feishu
        topic_mode: true

Steps to Reproduce

  1. Configure Feishu channel in microclaw.config.yaml
  2. Run microclaw start
  3. Observe successful Feishu authentication (open_id logged in logs)
  4. Observe panic when WebSocket long connection attempts TLS handshake

Expected Behavior

WebSocket connection should be established successfully without panicking.

Possible Root Cause

The pre-built Windows binary does not have either the aws-lc-rs or ring feature enabled for rustls, causing the runtime to fail when trying to auto-detect the crypto provider. The fix is likely in the Cargo.toml or release build configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions