After connect to the metamask, it redirect back to a new tab instead of the original URL
See original GitHub issueDescribe the bug When using some android device to connect to the DApp via Metamask Mobile App.
- once the user click Connect button from Metamask, it redirects to a new Tab that contains a random number from the URL link.
- The wallet is connected to the DApp but User has to close the Tab
SDK Version (if relevant)
- Version 1
To Reproduce Steps to reproduce the behavior:
- Go to ‘https://opensea.io/’ using Android devices
- Click on ‘Connect Wallet’
- Select ‘WalletConnect’
- Select Metamask
- Click
Connect
from Metamask - Error Happened: Metamask will redirect to the browser but open a new Tab. which the url something like: wc:c4e********@1?bridge=https%3A%2F%2F5.bridge.walletconnect.org&key=********
Expected behavior 6. Metamask will redirect to the browser with the existed website
Smartphone (please complete the following information):
- ZTE Blade A462 (Android 6.0.1)
- Samsung Galaxy Note8 (Android 9)
- Google Pixel 6 (Android 12)
Additional context This issue happens when you installed only Metamask on your device. if you instead of multiple wallets, the user would not experience this issue.
Issue Analytics
- State:
- Created a year ago
- Reactions:10
- Comments:12
Top Results From Across the Web
Redirect back to App from Metamask Mobile after connection
I am trying to connect a mobile app with Metamask Mobile. I use a deep link like metamask.app.link/www.myapp.com/metamask?autosign=1234.
Read more >How do I link a metamask account redirect to a particular web ...
I am working on a blockchain project, where a user registers his/her blockchain account a particular entity and then logs in with their...
Read more >One-click Login with Blockchain: A MetaMask Tutorial - Toptal
This article introduces a new login method to blockchain development: A one-click, cryptographically-secure login flow using the MetaMask extension, ...
Read more >How To Buy and Send ETH, And Use MetaMask Mobile's ...
You can check your transaction status on a block explorer like Etherscan, by clicking the pop-up link. After you have ETH in your...
Read more >How to redirect from browser to Metamask or similar app like ...
I have a website that detects metamask and connects with it on pc, but on the android mobile app browser when I open...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have found the solution. Instead of connecting with “connect button”, use deep link:
await connector.createSession();
const encodedUri = encodeURIComponent(connector.uri);
const href = 'https://metamask.app.link/wc?uri=${encodedUri}&target=_self'; //walletconnect use _blank
window.location.href = href;
Walletconnect use target=_blank
We are also experiencing this issue in our own app. It has worked before