WalletConnect / web3modal-vanilla-js-example

An example application how to use Web3modal from vanilla JavaScript
https://web3modal.com/
173 stars 147 forks source link

Demo does not work on mobile with WalletConnect and the MetaMask app installed #35

Open php4fan opened 2 years ago

php4fan commented 2 years ago
  1. In my Android phone, I have the MetaMask app installed, latest version.
  2. In Chrome, I go to https://web3modal.github.io/web3modal-vanilla-js-example/
  3. I tap on Connect Wallet
  4. A modal shows up offering me two choices: WalletConnect and Fortmatic.
  5. I tap on Wallet Connect
  6. Another modal, this one belonging to the Android OS, asks me to choose which app to use: Chrome or MetaMask. I choose MetaMask
  7. This gives focus to the MetaMask app, but MetaMask does nothing. It does not ask me to connect, or anything else. It just shows the main screen where I see my balance
  8. I manually come back to Chrome, where I had the above url open. Now I find a blank page in a new tab, so I close it and go back to the tab where I have the above url open
  9. I tap on the "Connect Wallet" button again. I repeat steps 3-5
  10. MetaMask pops up again, and this time does ask me to accept connecting to your webpage. I say yes
  11. It automatically closes Metamask and redirects me back to chrome
  12. again like in step 7, I find myself in a new blank tab, so I close it and go back to the tab with your demo
  13. There's a text that says "No wallet connected. Connect wallet to show accounts and their ETH balance". The "Connect Wallet" button below is greyed out and does nothing.
  14. I refresh the page. There's still the same text but now the "Connect Wallet" button is enabled
  15. I tap on it
  16. the modal shows up like at step 3 asking me to choose between WalletConnect and Fortmatic. I choose WalletConnect
  17. This does nothing. It does not show Android's dialog to choose an app and it does not open MetaMask. It just closes the dialog and I'm still at your page with the text that says "No wallet connected bla bla bla" and the Connect Wallet button is greyed out.

I retried again reloading the page and it always repeats steps 12-16. I never got to open MetaMask again.

php4fan commented 2 years ago

I wouldn't be surprised if there was a bug in MetaMask involved here.

php4fan commented 2 years ago

By clearing cookies (and ONLY by clearing cookies), I'm able to restart from step 1. Sometimes it will skip steps 6-8, and MetaMask will ask me to connect at the first try, but still after that the result is the same. At no point, ever, do I manage to see my account details in your page.