rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

[bug] wallet doesn't receive signature request if it is killed or after a while of initial connection

Open intergalacticspacehighway opened this issue 1 year ago • 7 comments

Current Behavior

Hi all!

The below video shows the demo of the issue.

https://user-images.githubusercontent.com/23293248/180949697-6070faec-2c1a-47a1-93ed-748d0e8f2674.mov

I think it fails to listen to the initial deep link signature request on app start.

Expected Behavior

The wallet app should respond to the signature request prompt on app restarts.

Steps To Reproduce

  1. Connect the wallet and keep the wallet app open, sign methods work as expected.
  2. Kill the app and try calling sign method. The app doesn't show the signature prompt.

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

https://github.com/intergalacticspacehighway/wagmi-disconnected-repro

also, I noticed that same behavior happens with metamask wallet 😕. It is consistently reproducible on my end.

I think debugging these on app start might reveal the issue.

https://github.com/rainbow-me/rainbow/blob/develop/src/handlers/deeplinks.ts#L28

https://github.com/rainbow-me/rainbow/blob/develop/src/App.js#L193

Looks related - https://github.com/facebook/react-native/issues/32350

looks like the signature requests are not dependent on deeplinks. Maybe something's wrong with initializing listener? 🤔 https://github.com/rainbow-me/rainbow/blob/develop/src/redux/walletconnect.ts#L501

A related issue so sharing my findings here, wallet stops responding to the signature requests after a while (maybe 1-2 days of connection or sometimes sooner). I am trying to press Sign message in the video below. Please ignore the horrible UI.

https://user-images.githubusercontent.com/23293248/182336674-ad8b077a-1ebb-4bfe-9281-c23edeb12066.MP4

WalletConnect websocket connection is sending the data to it's bridge server so I think the problem could be either in its relaying end or the wallet's receiving end.

Screenshot 2022-08-02 at 2 32 28 PM

It works seamlessly after disconnecting and connecting. Also, it establishes a new socket connection. It appears to me that either WalletConnect or wallet kills the session but the state is still connected.

https://user-images.githubusercontent.com/23293248/182340793-5c0d8fc3-4794-4718-b474-8edc4f48ea85.MP4

Screenshot 2022-08-02 at 2 47 23 PM

message from pedro. Exciting that it seems to be reliable on v2. In the meantime, can we work on some acknowledgment from the wallet in the above scenario?

Screenshot 2022-08-03 at 12 40 52 PM

Stale issue message

github-actions[bot] avatar Oct 03 '22 20:10 github-actions[bot]