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

Error Connect to metamask #1809

Open
1 task done
peterpan0708 opened this issue Jul 6, 2023 · 13 comments
Open
1 task done

Error Connect to metamask #1809

peterpan0708 opened this issue Jul 6, 2023 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@peterpan0708
Copy link

peterpan0708 commented Jul 6, 2023

Current Behavior

all popular websites using web3-onboard have this issue, eg. curve.fi, https://onboard.blocknative.com/

image image

Expected Behavior

should connect to metamask correctly

Steps To Reproduce

It's not 100% reproduce, but if you keep trying for 5 more times, it will happen

  1. open website, connect to metamask
image
  1. click disconnect button
image 3. close the website label image 4. open the website 5. connect to metamask image

What package is effected by this issue?

@web3-onboard/injected

Is this a build or a runtime issue?

Runtime

Package Version

latest

Node Version

18.15.0

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

No response

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.
@peterpan0708 peterpan0708 added the bug Something isn't working label Jul 6, 2023
@Adamj1232
Copy link
Member

Adamj1232 commented Jul 6, 2023

@peterpan0708 I tried on both site 10x across multiple browsers and was unable to reproduce.
Can you create a reproducible example or video?

@peterpan0708
Copy link
Author

@peterpan0708 I tried on both site 10x across multiple browsers and was unable to reproduce. Can you create a reproducible example or video?

2_1688692669.mp4

@peterpan0708
Copy link
Author

@peterpan0708 I tried on both site 10x across multiple browsers and was unable to reproduce. Can you create a reproducible example or video?

2_1688692669.mp4

I think it's a common issue, because all of our team members can reproduce

@peterpan0708
Copy link
Author

@Adamj1232
more information:
image
our code stuck at this line
go deep into the source code
41688697058_ pic
requestAccounts() doesn't return

@tim-schultz
Copy link

tim-schultz commented Jul 7, 2023

I'm also experiencing this error:
Screenshot 2023-07-07 at 11 15 40 AM
Screenshot 2023-07-07 at 11 16 56 AM

@Adamj1232
Copy link
Member

@schultztimothy I think this is a different error than what is reported in this issue.
The error you are noted we are aware of and we are troubleshooting with the walletconnect and metamask teams.
Are you a dev with curve.fi?

@tim-schultz
Copy link

@schultztimothy I think this is a different error than what is reported in this issue. The error you are noted we are aware of and we are troubleshooting with the walletconnect and metamask teams. Are you a dev with curve.fi?

Thanks for your quick response! I'm not with Curve, but am a dev on Gitcoin's passport application and we are experiencing the same issue. We recently updated to "@web3-onboard/walletconnect": "2.4.0", and are about to release the update.

I assume since you all are actively working on it we should be good to release and the issue should be patched soon? Thanks again!

@Adamj1232
Copy link
Member

@schultztimothy we have pinpointed the issue. MetaMask when handling a connection through WalletConnect requires a URL to be passed.
This previously was populated within the WalletConnect package as the web3OnboardInit.appMetaData.explorer property.
I have an open PR 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

@peterpan0708
Copy link
Author

@schultztimothy we have pinpointed the issue. MetaMask when handling a connection through WalletConnect requires a URL to be passed. This previously was populated within the WalletConnect package as the web3OnboardInit.appMetaData.explorer property. I have an open PR 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

Hi, do you reproduce the Connecting... issue?
Is there any progress?
Thanks for the reply.
@Adamj1232

@tim-schultz
Copy link

@schultztimothy we have pinpointed the issue. MetaMask when handling a connection through WalletConnect requires a URL to be passed. This previously was populated within the WalletConnect package as the web3OnboardInit.appMetaData.explorer property. I have an open PR 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

This fix worked for us!

We are experiencing issues still with using gnosis safe's wallet. Not sure if you have had any other reports of this

@taylorjdawson
Copy link
Contributor

@peterpan0708 Did the release which included this PR resolve your issue?

@peterpan0708
Copy link
Author

@peterpan0708 Did the release which included this PR resolve your issue?

no, this PR is about walletconnect, not reslove this issue

@Adamj1232
Copy link
Member

@peterpan0708 is this still an issue after updating your local version of MetaMask extension to the latest version?

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
Development

No branches or pull requests

6 participants