metamask-mobile
metamask-mobile copied to clipboard
User does not get prompted to connect metamask wallet to other dapp
Describe the bug User does not get prompted to connect metamask wallet to flutter dapp when using walletconnect_dart package or any other packages with the same purpose. Usually happens when user is asked to re-authenticate using password/fingerprint in metamask after opening metamask app from flutter dapp in order to connect the wallet.
Screenshots
Expected behavior (1):

Actual behavior (2)

To Reproduce
- Clone the repo from the following url: 'https://gitlab.com/graflr/flutter_rarible_example'
- Connect your smartphone to your computer, (make sure to have flutter installed), and run "flutter devices". Copy the id of your phone and then run "flutter run -d<phone_id>" in order to run the project on your phone. You can also run it in a simulator; in any case, make sure you have metamask mobile app installed in your device
- When the app launches, click on the "connect wallet" button: you will be redirected to metamask app and if everything goes well, you should get the pop-up message that appeared in the screenshot before. From the flutter app again, click on "disconnect wallet" and then on "connect wallet" again. Repeat the process until you are not prompted to connect your wallet (as the first screenshot showed).
Expected behavior Metamask should prompt you to connect your wallet to the flutter app (as shown in screenshot number 1)
Smartphone (please complete the following information):
- Device: Samsung Galaxy A51 5G, should potentially happen on any android and/or ios device
- OS: Android 12
- App Version: 5.6.0, there are also reports about the same from several months ago
Severity I'm concerned about the fact that reopening the metamask app solves it, but please. This is not a solid workaround, and definitely not a solution for a production-ready dapp. From my perspective, it is worth it for the metamask team to look into this and give it a try in order to fix it.
Same issue here.
Hey @jmquilez, thanks for reporting! Could you tell me if that is happening with you only when MetaMask mobile app is closed? (Not in the background) If that confirms we are aware and working on it!
For me the problem is when the app is already opened, running in the background and asks me to reauthenticate again.
@jydelort you also have this issue with an android 12, when you mean reauthenticate you mean connect again? Could you send a record for we try to understand better how to replicate it?
Hey @tommasini, in my case the issue happens both whenever the app is closed or running in the background, no matter whether I have to reauthenticate again or I'm already authenticated
I have the same problem
https://user-images.githubusercontent.com/34720083/198093631-7d107250-3145-4d04-9ec7-f08ea6ccb41f.MP4
I send the video and the url I used launching uri: metamask://wc?uri=wc%3Aa0aadf03-016b-418f-9271-9d36e673140a%401%3Fbridge%3Dhttps%253A%252F%252Fv.bridge.walletconnect.org%26key%3D65fccc07185772cc38d8f95e51a9cfd010f3316d0826608a9ce0bb8d0a3999a2
Any updates on this?
Bump.
@andreahaku Same issue over here, there is any way we can help you to debug this?, it is a terrible experience when using metamask APP
so few questions: is it only happening on Android or iOS as well? If Android, is it happening on 12 or later? Is it only happening with Dart/Flutter package or this happens on other platforms libraries (you can try using https://example.walletconnect.org/). Thanks
I have only tested over Android, on 12 or later, I tried just a few times, but with https://example.walletconnect.org/ seems to be working well
I will test over iOS and post my results
This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.
This issue was closed because it has been stalled for 7 days with no activity. If you feel this was closed in error please reopen and provide evidence on the current production app. Thank you for your contributions.
Is there any update on this? I am facing this issue as well
Have you found the solution?
Somebody should be really trying to fix this bug, it makes the app experience a lot worse up to a point that it doesn't even look professional.
KEY UPDATE FOR EVERYBODY INTERESTED IN THE ISSUE
This issue was originally created because the walletconnect connection prompts weren't occasionally showing up in the metamask mobile app, after the user was asked to connect their wallet from a dapp (I recall it used to work in other apps such as trustwallet); sometimes they did, sometimes they didn't, and it all happened quite in a random way and without an apparent cause. However, lately these prompts have ceased to work completely in all wallet apps because as mentioned in the latest walletconnect_dart issue (RootSoft/walletconnect-dart-sdk#111), walletconnect v1 has been shutdown and is no longer functional, making necessary a migration to walletconnect v2 (https://pub.dev/packages/walletconnect_flutter_v2). I have published an updated version of the rarible app (which I mentioned in the first comment, https://gitlab.com/graflr/flutter_rarible_example, but this link is unfortunately no longer working and the rarible example app has been removed from the Graflr gitlab repo) that you can find here: https://github.com/jmquilez/rarible. Just run the app in your device and tap the "Connect" button.
The key walletconnect_v2 modifications start at https://github.com/jmquilez/rarible/blob/ac66bffa4d4627b0fffae90aae24ad4a6c5eca22/lib/main.dart#L886 and are basically three functions that serve as a replacement for the original login function.
Apart from the connection prompt show-up times being sometimes oddly longer than expected (I'll probably open an issue about this on the walletconnect v2 repo in the future), so far I have not experienced this same issue with the same high frequency as originally reported, but there is still room for improvement (mainly regarding metamask, as I've tested it with trustwallet (which btw doesn't support some networks, as Polygon Mumbai) and it is consistently quicker to open. Might open an issue about it in the future). Please notify in case the original issue still happens to you.
Thanks :)