MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.11k stars 1.09k forks source link

[Bug]: Signature popup not showing up sometimes on iOS/Android app with WalletConnect #9116

Open MananTank opened 5 months ago

MananTank commented 5 months ago

Describe the bug

When connecting the MetaMask app with WalletConnect and then sending a request to sign a message, Sometimes the MetaMask app does not show the signature popup, sometimes it takes 20-30 seconds and sometimes it randomly shows the signature popup for a request that was triggered 5-10 minutes ago

You can replicate the issue here: Test App

This issue is not always replicable - It only happens sometimes. If you try signing the message multiple times - you will probably be able to replicate this issue.

I am only seeing this issue in MetaMask - The others wallets like Trust Wallet, Rainbow etc are working as expected

Expected behavior

When sending a signature request - MetaMask app should show the signature request popup

Screenshots/Recordings

Please see the below recording:

You will see the MetaMask does not show the signature popup, while Trust wallet does.

( Note: You have to try it a few times to replicate the issue - sometimes it works and sometimes it doesn't on MetaMask - while it always works for other wallets )

https://github.com/MetaMask/metamask-mobile/assets/22043396/389674a1-cb3e-4b11-8eac-8c6d6c2f6694

Steps to reproduce

On your Mobile device: ( iOS preferred )

  1. Go to Test App
  2. Click on "Connect Wallet"
  3. Select MetaMask and connect
  4. Go back to webpage and wait for connection to be confirmed
  5. click on "Sign Message" button -> you will be redirected to MetaMask app
  6. At this point -> MetaMask should show popup to sign the message "hello!"

If you see this popup, it means that this is working for you and the issue is not replicable. Try doing this a couple more times and you will be able to replicate this issue - either the Signature popup will take a really long time to show up ( 20-30 seconds ) or it won't show up at all.

If you are still not able to replicate this issue, try connecting and then switching the network and then signing the message as mentioned in below steps:

Error messages or log output

No response

Version

7.18.0

Build type

None

Device

iPhone 15 Pro Max

Operating system

iOS

Additional context

No response

Severity

No response

ntchungse commented 5 months ago

same issue. If I use metamask ver 7.14., it works fine

cashspicy commented 5 months ago

Same issue. Updating the metamask app didnt help too.

nfftdev commented 5 months ago

Same issue on v7.18 and sometimes when it does popup, it doesn't redirect after signing. Instead it will say "Please check the application". But sometimes it redirects back to the browser as expected.

Suhel-Kap commented 5 months ago

I'm developing a react native application, which uses wallet connect. I face a similar issue as well. The metamask popup appears when in USB debugging mode on a physical device (note that it still fails in an emulator), but it always fails in a production build.

If you try the Rabby wallet mobile app on Android, you can see the same issue there, when you try to request for a signature when transacting.

Versions used

"react": "18.2.0",
"react-native": "0.73.5",
"viem": "1.21.4",
"wagmi": "1.4.13"

Metamask android version: 7.18.0

christopherferreira9 commented 5 months ago

Hi all! We are aware of this issue and it they started showing up after bumping @walletconnect/se-sdk to version 1.5.0. If you were to wait for a few minutes with the wallet open or switch between Dapp and Wallet a few times you'll end up getting the request. We're currently in sync with WalletConnect to have all of these delays sorted and have it ready and working as soon as possible.

DeynekaYuriy commented 4 months ago

I'm developing a react native application, which uses wallet connect. I face a similar issue as well. The metamask popup appears when in USB debugging mode on a physical device (note that it still fails in an emulator), but it always fails in a production build.

If you try the Rabby wallet mobile app on Android, you can see the same issue there, when you try to request for a signature when transacting.

Versions used

"react": "18.2.0",
"react-native": "0.73.5",
"viem": "1.21.4",
"wagmi": "1.4.13"

Metamask android version: 7.18.0

Hi! Have you found a solution?÷

hightouch67 commented 4 months ago

Same issue here. It randomly works. Hope this become a priority. If anyone has a workaround please share it.

christopherferreira9 commented 4 months ago

Hi all! We've recently merged the fixes for this issue that improves the behaviour and responsiveness when using WalletConnect on https://github.com/MetaMask/metamask-mobile/pull/9188 and https://github.com/MetaMask/metamask-mobile/pull/9150. These will be available in version 7.21.0. I'm closing this issue but please feel free to open a new issue whenever you see fit.

jiaji-wei commented 4 months ago

Hi everyone ! I still can't complete the signing. Every time I try to connect my wallet to sign, a "Return to app" message pops up, but the signing window doesn't appear. Any ideas?

Version 7.21.0

iOS version is already update to v7.21.0 (1317)

image
jewelsonn commented 4 months ago

Yes. Even I can't get the signing message. It has something to do with it's internal app data, if I run it fresh after clearing the app data it works but then it stops there after. Using version 7.20.1 (1314) Android platform.

Suhel-Kap commented 4 months ago

Yes. Even I can't get the signing message. It has something to do with it's internal app data, if I run it fresh after clearing the app data it works but then it stops there after. Using version 7.20.1 (1314) Android platform.

These will be available in version 7.21.0 as mentioned by christopherferreira9

We'll have to wait for the update

orhunerd commented 4 months ago

Hi all! We've recently merged the fixes for this issue that improves the behaviour and responsiveness when using WalletConnect on #9188 and #9150. These will be available in version 7.21.0. I'm closing this issue but please feel free to open a new issue whenever you see fit.

Unfortunately after the 7.21.0 release the connect and sign modals never appears on my end. I started to see the "Connecting to Metamask" modal but nothing happens after that. Before this release, if you go back and forth between the app and metamask, you had a chance to see the connect or sign modal. Thanks for keeping an eye on this though. Device: Iphone 11 App: Safari React WalletConnect IMG_1694

christopherferreira9 commented 4 months ago

Hi @orhunerd , are you able to share a dapp we can reproduce this with?

orhunerd commented 4 months ago

Hi @orhunerd , are you able to share a dapp we can reproduce this with?

Hi @christopherferreira9 You can reproduce the issue in our app cookievault.com. After you navigate there hit connect wallet. You will see a "wallet connect" pop up. Hit metamask..

Another site you can reproduce this is tofunft.com if you hit the profile symbol on top right side of the screen, this will trigger a modal to connect a wallet. You can either choose wallet connect or metamask directly. It all results the same. You end up waiting on "Connecting to Metamask" modal on Metamask app. I have rebooted my iPhone and repeated again it all end up the same.

orhunerd commented 4 months ago

@christopherferreira9 this is a screen recording about the issue https://github.com/MetaMask/metamask-mobile/assets/85942921/e5fc4669-ab9b-47de-be2d-4d2a3f4dba1f

orhunerd commented 4 months ago

@christopherferreira9 our app is on react, web3modal, wallet connect, wagmi. Any suggestion for us to make this wallet connection to work better?

VijiHithub commented 3 months ago

Greetings Team,

I'm currently utilizing the Metamask app version 7.22.0 on my Android device. Unfortunately, I'm encountering an issue where the pop-ups for connect, approve, or sign transactions are not appearing. I'm working on integrating wallet connect functionalities with ethers.js. I would greatly appreciate it if you could investigate this issue and provide a prompt solution.

Thank you very much in advance!

christopherferreira9 commented 3 months ago

Reopening this issue so that we can investigate further with the latest provided information.

codernuub commented 2 weeks ago

Facing same issue on android mobile. I am using metamask-sdk.js.

Its look like metamask failing to communicate properly with dapp app, when browser running in background.

I opened my dapp webapp and metmask app on dual screen on same mobile, then login was working fine.