-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wallet_addEthereumChain doesn't get redirect to Metamask #227
Comments
Hey @ammarvohra, could you please upgrade to v1.1.6 and let me know if the issue persists? |
Sure, I'll do it and will update you. Thanks |
@skibitsky still no luck of working, even worse, in this version sometimes users are not getting back to the game after connection is successful. They need to comeback to the game close the Modal view and open and do connection again |
Could you please describe the exact steps so I could reproduce them? What version of MetaMask do you have?
Do you still get |
Opened my game -> Clicked on button to connect the Metamask -> Metamask opened -> Popup comes to connect the wallet -> Connect pressed -> Doesn't redirect to my game -> Opened my game from app stack -> Closed the WalletConnectModal -> Clicked on connect -> Metamask opens up with connection popup -> Clicked on Connect -> Redirected back to my game.
Yes if Metamask is not opening after the connection this error is thrown, and if Metamask get's open it doesn't throw error but there is also no Popup for adding new Chain Network. |
I haven't changed anything related to the redirection in the last release; that may be an issue on the MetaMask side.
What happens if you keep the modal open for 5-8 seconds after you open the game instead of closing it immediately? |
Idk but what I noticed was this that 1.1.4 was having some similar issue, while 1.1.5 was smooth and 1.1.6 got that issue.
Doesn't do anything just keep saying trying to connect or try again. But the thing I couldn't understand is some people can open the Metamask when they click on Add chain network, but even after waiting for some 10-15 seconds on Metamask the option/popup to add chain doesn't come up. |
MetaMask fixed that in the latest release |
User's phone configuration: Still no luck |
A few more questions 🙏
|
No this uesr doesn't get exception as when clicking on Add chain it take him back to Metamask but Metamask does nothing
1.1.6
Yeap, same issue
Yeap they reinstall the application everytime, so the previous session get's expired so they need to make a new connection |
Okay, it's good that they don't get the exception. Could you please share a code snippet demonstrating how you detect the need to add a new chain to MetaMask and how you add and switch the chain? |
Here is the code:
|
Same issue! I was trying to switching the chain after user successfully connected to session. @skibitsky @ammarvohra Below is my function code to change the chain -
Below is the code for extention method provided by WalletConnectUnity.Core.Evm i.e SwitchEthereumChainAsync
and below is my namespace from which i am creating the session
|
@deveshbeniwal could you please open a new issue with the bug report template? The error message you're getting is different than the one reported here. |
Added - #232 (comment) |
Describe the bug
Some of my users has this issue that when they try to add chain network, they are not taken back to Metamask from my Game, instead it throws error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should take me to Metamask application where a popup appears to add new network chain
Screenshots
Environment
Is this happening in Unity Editor or on a player like Android, iOS, Windows?
Android 10
Wallets used for testing
Metamask
Additional context
None
The text was updated successfully, but these errors were encountered: