Skip to content

[Windows] WalletConnect "Not initialized" error (HTTP 403) during pairing #144

Description

@coinselor

Describe the bug
WalletConnect pairing fails specifically on Windows machines. The application logs report a WebSocketException: ... HTTP status code: 403. This is caused by the legacy walletconnect_flutter_v2 library generating a malformed User-Agent string that includes unescaped double quotes (e.g., "Windows 10 Pro") on certain Windows 11 builds (Insider Build 26200+). The WalletConnect relay server now rejects these headers.

To Reproduce
Steps to reproduce the behavior:

  1. Launch Syrius on a Windows 11 machine (I've tried Build 26200).
  2. Navigate to the WalletConnect tab.
  3. Paste a wc: URI.
  4. See error: Pairing failed: WalletConnectError(Code: 1, message: Not initialized, data: null).
  5. Check logs to see the underlying 403 Forbidden WebSocket error:
WARNING NotificationUtils sendNotificationError:
WebSocketException: Connection to
'https://relay.walletconnect.com:0?auth=...&ua=wc-
2%2FFlutter-2.0.14%2Fwindows-%22Windows+10+Pro%22+10.0+%28Buil
d+26200%29%2Fwindows&useOnCloseEvent=true#'
was not upgraded
to websocket, HTTP status code: 403 null

Expected behavior
The WebSocket connection to relay.walletconnect.com should be established successfully, and the pairing proposal should appear.

Workaround
Currently, there is no workaround for Windows users. The feature continues to work as expected on Linux and macOS because their OS identification strings do not contain double quotes.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Windows 11 (Internal version 10.0, Build 26200+)
  • Syrius Version: 0.2.4
  • Commit hash: 08230c4

Additional context
Attempting to fix this by migrating to the modern replacement library reown_walletkit results in a few dependency conflicts:

  • reown_walletkit requires freezed_annotation: ^3.1.0 pinned by znn_ledger_dart to ^2.4.1
  • I tried overriding freezed_annotation but ran into both znn_sdk_dart and znn_ledger_dart pinned to pointycastle ^3.6.2 while reown_walletkit requires pointycastle ^4.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions