MetaMask / MetaMask/metamask-extension
[Bug]: Performance - MV3 - When network is down, it takes several seconds to open the popup when a tx is triggered
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
When network is down, it takes several seconds to open the popup when a tx is triggered in MV3 builds.
This also causes test flakiness ([see](https://github.com/MetaMask/metamask-extension/issues/25674))
### Expected behavior
_No response_
### Screenshots/Recordings
https://github.com/MetaMask/metamask-extension/assets/54408225/52120359-db18-4e5d-8775-6998083f51be
### Steps to reproduce
1. Start ganache
2. Add ganache to MM
3. Go to the test dapp
4. Connect
5. Trigger a tx -- see the popup opens fast
6. Terminate ganache
7. Trigger more tx's -- see sometimes the popup takes ~5-10 seconds to open
### Error messages or log output
_No response_
### Version
11.16.x prod with MV3 (chrome)
### Build type
None
### Browser
Chrome
### Operating system
Linux
### Hardware wallet
_No response_
### Additional context
_No response_
### Severity
_No response_
Contributor guide
Research direction
Reproduce the delay with Ganache and the test dapp by comparing normal operation with Ganache stopped, using the MV3 Chrome build described in the issue. Trace the popup-opening path and related flaky test from issue 25674; done means transaction popups open promptly when the network is unavailable and the intermittent test failure is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100