MetaMask / MetaMask/metamask-mobile
[Bug]: Cancelling Uniswap connection request in in-app browser leaves session stuck until app restart
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
**Describe the bug**
This is a recreation of https://consensyssoftware.atlassian.net/browse/WAPI-844
-----
When cancelling (rejecting) a connection request from Uniswap within the MetaMask Mobile in-app browser, the dapp connection flow becomes stuck. After cancellation, subsequent connection attempts—either to Uniswap or other dapps—fail to trigger the connection modal. The following error is logged:
```
(NOBRIDGE) WARN [MetaMask DEBUG]: {"code": -32002, "message": "Request of type 'wallet_requestPermissions' already pending for origin https://pancakeswap.finance. Please wait."}
```
The only way to recover is to fully close and relaunch the app.
Thread where initially reported by @Joao Tavares : https://consensys.slack.com/archives/C097JHB70J0/p1763024568857779
- MetaMask Mobile (in-app browser)
- Observed on main branch build
- Also appears to occur on prod (though test device was running a TestFlight build)
- Reproducible with Uniswap; other dapps (e.g., PancakeSwap) do not appear to trigger it consistently
**Steps to reproduce**
1. Open MetaMask Mobile and navigate to Uniswap in the in-app browser.
2. Attempt to connect the wallet.
3. Cancel (reject) the connection request.
4. Attempt to reconnect to Uniswap or connect to another dapp.
**Error messages or log output**
```shell
```
**Where was this bug found?**
Live version (from official store)
**Version**
7.62.0
**Build number**
latest
**Build type**
None
**Device**
All
**Operating system**
Android, iOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the cancellation flow in the in-app browser and search for handling of wallet_requestPermissions and pending connection requests. Done means rejecting a Uniswap request clears the stuck state so a later connection opens its modal without restarting the app, with regression coverage for the flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100