walletconnect-monorepo
walletconnect-monorepo copied to clipboard
Failing to receive signature from Gnosis Safe multisig app
Describe the bug
I am building an app that needs to be able to receive messages signed with Gnosis Safe
While this worked well with Metamask, I am getting a Request expired. Please try again.
error when I do it through Gnosis Safe. I have tested this on Sepolia, signing the message right away and having the tx confirmed by Safe in under 1 minute. The app keeps waiting to receive the signature from WC until the request times out.
To fetch the signature I am using signMessageAsync
from wagmi's useSignMessage
hook.
SDK Version (if relevant)
- @web3modal/wagmi - 4.1.6
- wagmi - 2.5.19
To Reproduce Steps to reproduce the behavior:
- Login through WC with Safe Wallet on Desktop
- User clicks a button requesting them to Sign a message
- User is redirected to the Safe wallet page in the browser
- User signs tx which gets confirmed less than a minute after
- User then goes to the app when a loader is spinning until the signature is received
- After a few minutes the browser console logs the error:
Request expired. Please try again
Expected behavior The signature is received after a while, before timing out
hey @eugenPtr session requests have default expiry of 5 minutes. Is it taking longer for you to sign?
hey @ganchoradkov, thanks for picking this up. It's taking under a minute to sign and see the transaction confirmed.
@ganchoradkov any idea what the issue could be here?
Please update Wagmi and Web3Modal packages to latest. Feel free to repoen if the issue persists.
I'm experiencing this same issue where useSignMessage
, WalletConnect, and Gnosis Safe doesn't detect the Safe contract's emitted SignMsg
event and hangs in pending until timing out.
I'm using wagmi latest (2.10.9), @walletconnect/ethereum-provider latest (2.13.3), and @walletconnect/modal latest (2.6.2).
Not one of the wallets and connectors work
I'm experiencing this same issue where
useSignMessage
, WalletConnect, and Gnosis Safe doesn't detect the Safe contract's emittedSignMsg
event and hangs in pending until timing out.I'm using wagmi latest (2.10.9), @walletconnect/ethereum-provider latest (2.13.3), and @walletconnect/modal latest (2.6.2).
I ended up "solving" this by writing a wrapper library that polls for the creation of the eip-1271 hash via useReadContract
in parallel with the useSignMessage
. Then I abort the pending useSignMessage when the eip-1271 hash becomes available.
@ryanberckmans do you mind sharing the workaround?
I'm not able to repro in the latest: https://lab.web3modal.com/library/wagmi/
I'm able to sign a message with Safe succefully.
please provider a MRE