-
Notifications
You must be signed in to change notification settings - Fork 621
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
Issues with WalletConnectv2 and MetaMask #2789
Comments
@cbonaco1 I am also facing the same issue, it seems to be working well with Rainbow Wallet but not with Metamask and TrustWallet. TrustWallet I am able to log in but not able to sign the message. |
I guess I'm in the same error. When I launch QR on the desktop and take a picture of QR in the Metamask app to connect, even if I take a picture of QR intermittently, it does not go over from QR, or even if I sign lastly, I cannot get the signing result from the desktop. |
Hey @cbonaco1, feel free to disregard the error in the console, in short, it's just noise. |
I use it by:
called connect first. You can try. |
@ganchoradkov let me know how can we fix this issue. Just sharing code, I just adding base code here ` const web3 = new Web3(); async function connectWalletv2(callback, dispatch) {
} ` |
hey @ganchoradkov thanks for the info on the console error. I was about to go down that rabbit hole. |
just an update here. |
|
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided |
hey @364734461 as @ganchoradkov mentioned above, that error can be disregarded. |
hi @ganchoradkov thanks for providing those steps. after following the steps, I see two logs in the JS console:
and then
The UI does not change, but it does show a pairing if I go to the Pairing tab. If I try to connect again, it says "a pairing already exists". please let me know if this is helpful, and what the next steps might be. |
This might just be a MetaMask issue (circumvented in a more recent version of @walletconnect/ethereum-provider (2.8.4). |
just an update here. we were able to get the wallet connection working after the following steps were taken:
hope this helps. |
Same issue for me. All things above done but doesn't work |
Got the same error on our web dApp: Everything is working fine on localhost with Metamask and Trust wallet. But after deploying it to the dev environment, this error occurred every time I open the Modal. Using: |
Describe the bug
Connection to MetaMask (and other wallets such as TrustWallet, Ledger) is not working after scanning the QR code.
SDK Version (if relevant)
@walletconnect/ethereum-provider
version2.8.1
@walletconnect/modal
version2.5.2
@usedapp/core
version1.2.10
MetaMask iOS app
v7.0.1(1126)
To Reproduce
For our setup, we are using the
@walletconnect/modal
package (following the Just Modal steps here). we are also usinguseDAapp
for blockchain integration, notwagmi
.Expected behavior
QR code modal should close, wallet should be connected to the dApp
Actual behavior
For some MetaMask users, nothing happens after scanning the QR code. The QR code modal remains open, and nothing happens in the MetaMask app. For some other MetaMask users, the wallet does connect, but am unable to fetch any onchain data. Looking at some of the calls to
https://rpc.walletconnect.com/v1/?chainId=eip155:5&projectId=PROJECT_ID
, some of the response is error code -32603error processing the request: Error parsing relay: Redirect not found: goerli.gateway.pokt.network
Similar experience for users with TrustWallet. There is a spinning modal on the TrustWallet app, and no connection on the dApp.
When the QR code modal opens, we are also seeing one error pretty consistently in the JS console that says:
Please let me know if maybe our modal setup is incorrect.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
As mentioned earlier, we are using useDApp, not wagmi.
The diff for our changes from v1 to v2 is shown below. Instead of passing an
infuraId
toWalletConnectProvider
, we are passingprojectId
,chains
, andshowQrModal
toEthereumProvider.init
Any guidance here is appreciated, thank you!
The text was updated successfully, but these errors were encountered: