WalletConnectKotlinV2 icon indicating copy to clipboard operation
WalletConnectKotlinV2 copied to clipboard

The WalletConnect SDK attempts to send traffic over a disconnected socket connection

Open marctatham opened this issue 9 months ago • 1 comments

Describe the bug The WalletConnect SDK attempts to send traffic over a disconnected socket connection.

SDK Version

  • Client: [e.g. Kotlin]
  • Version [e.g. 22]

To Reproduce Steps to reproduce the behavior: As this is behaviour internal to the CoreCommonModule, it is difficult. But I can describe the steps that I believe incurred this behaviour.

  • initialise CoreClient to use ConnectionType.MANUAL
  • for your Dapp's interactions with WalletConnect, ensure the behaviour is
    • establish socket connection
    • perform action (connect wallet/sign request/disconnect wallet)
    • disconnect socket connection In particular the logs were after performing a disconnect wallet event

Expected behavior If the socket connection is not active, the SDK should not be trying to send requests over it.

Screenshots No screenshot, but the logs are more useful here anyway

11:53:02.131 DappDelegate          V  onConnectionStateChange ConnectionState(isAvailable=false)
11:53:02.132 WalletCon...taSource  V  [disconnectSocket] disconnected
11:53:02.695 VRI[WalletActivity]   D  visibilityChanged oldVisibility=true newVisibility=false
11:53:02.695 VRI[Pop-up window]    D  visibilityChanged oldVisibility=true newVisibility=false
11:53:02.740 VRI[LoginActivity]    D  visibilityChanged oldVisibility=true newVisibility=false
11:53:04.150 FA                    I  Application backgrounded at: timestamp_millis: 1715939582146
11:53:25.580 CoreCommo...onModule  E  Unsubscribe to topic: Topic(value=28a29f690e9ea0a36e2bf19caff574c39968349ed875dd29da62d0c6d1a0ca9a) error: kotlinx.coroutines.TimeoutCancellationException: Timed out waiting for 60000 ms

Device (please complete the following information):

  • Device: Pixel 6
  • OS: Android 14
  • Version AP31.240322.027

Additional context While I'm able to more easily reproduce this in context of my application is configured to manually determine when to open/close the socket connect, this highlights that this will likely happen in the case of ConnectionType.AUTOMATIC where the SDK attempts to ensure the socket is remained open.

marctatham avatar May 17 '24 10:05 marctatham