Skip to content
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

Walletconnect not working with Metamask mobile app #1815

Closed
1 task done
anuj0361 opened this issue Jul 7, 2023 · 6 comments · Fixed by #1822
Closed
1 task done

Walletconnect not working with Metamask mobile app #1815

anuj0361 opened this issue Jul 7, 2023 · 6 comments · Fixed by #1822
Assignees
Labels
bug Something isn't working

Comments

@anuj0361
Copy link

anuj0361 commented Jul 7, 2023

Current Behavior

I should be able to connect using Wallet connect QR code modal through Metamask mobile app.

Expected Behavior

Walletconnect not working with Metamask mobile app

Steps To Reproduce

  1. Open https://oliveapp.finance/earn/vaults
  2. Click Connect Wallet & Choose Wallet connect option
  3. QR code will popup
  4. Scan this QR code from your Metamask Mobile app.
  5. It will through error

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.8.8

Node Version

No response

What browsers are you seeing the problem on?

Chrome

Relevant log output

`8776.5a17a94aa453920a.js:85 Error: User rejected methods.
    at 8776.5a17a94aa453920a.js:33:31191
    at async n (8776.5a17a94aa453920a.js:33:31018)
_app-7dd9a326e04a4a14.js:5 err creating new session:  Error: User rejected methods.
    at 8776.5a17a94aa453920a.js:33:31191
    at async n (8776.5a17a94aa453920a.js:33:31018)`

Anything else?

Versions
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/react": "^2.8.8",
"@web3-onboard/walletconnect": "^2.4.0",

image Using this config for wallet connect

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.
@anuj0361 anuj0361 added the bug Something isn't working label Jul 7, 2023
@Adamj1232
Copy link
Member

@anuj0361 we are aware of the issue and working closely with the walletconnect and MetaMask teams to try and resolve this issue. We will report here as progress is made.

@anuj0361
Copy link
Author

anuj0361 commented Jul 8, 2023

If there's an ETA please share. @Adamj1232

@chouandy
Copy link

chouandy commented Jul 8, 2023

Hi @Adamj1232,
I found that the possible problem is when appMetadata doesn't set explore or gettingStartedGuide url.
This url has an empty string.
The MetaMask mobile wallet should have verified that this url is not empty, resulting in an error.
After setting the explorer url everything works fine.

@0xhashmap
Copy link

I can confirm that the problem is not present after adding an explore url string in the appMetadata object.

@Adamj1232
Copy link
Member

Confirming @0xhashmap - @chouandy @anuj0361 - Please add an explore URL to the onboard initialization's appMetaData object.
MetaMask added a requirement that a URL is passed with WalletConnect support and the appMetaData.explorer is passed into walletConnect v2 initialization.
I will get a PR together to add the requirement to the TS object and all docs.
Thank you for the feedback and community support!

@Adamj1232
Copy link
Member

There is a PR open - #1822 to add a WC init prop to define this more clearly as well as enhanced validation and documentation around this.
To resolve this issue in the short term please pass in the dapp URL into web3OnboardInit.appMetaData.explorer or you can wait until the noted PR is in alpha to test with the walletconnect init prop dappUrl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
7 participants