Uniswap / Uniswap/interface

sometimes the connection doesn't work

Open
#6,613 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Bug Description
A clear and concise description of the bug.

After I used uniswap interface to connect to MetaMask, then I closed the page and reopened the page, sometimes I couldn’t connect.
Then I execute the following code in the console:
const provide = new _ethers.providers.Web3Provider(window.ethereum)
provide.provider.request({ method: ‘eth_chainId’ }).then((data) => console.log(data))
I found that this request is still in pending.

Steps to Reproduce
1、connect to a web3 website,such as uniswap\gmx
2、close the website after connected
3、open a new label,visit the connected site.
This problem is not inevitable, it takes multiple attempts. and do not open the console when open the site.
...

Expected Behavior

Additional Context
metamask version 10.30.2
explore: google chrome 113.0.5672.126
system: macos

i can reproduce in gmx, but ican‘t reproduce in dydx

c2afe9e0474cac642910e207d0926f7a8bec138d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the described reconnect flow in Chrome 113 with MetaMask 10.30.2, then inspect the pending eth_chainId request after reopening the site. Done means the intermittent connection failure is isolated and reconnecting no longer leaves that request pending.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.