MetaMask / MetaMask/metamask-extension
Error: state.SelectedNetworkController.perDomainNetwork is missing from SelectedNetworkController state
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
Sentry Issue: [TEST-METAMASK-B0X](https://metamask.sentry.io/issues/6061432264/?referrer=github_integration)
```
Error: state.SelectedNetworkController.perDomainNetwork is missing from SelectedNetworkController state
at None (/metamask/background-2.js:1:1054)
at Object.migrate (/metamask/background-2.js:1:1442)
at o.migrateData (/metamask/background-0.js:1:251943)
at async Me (/metamask/background-8.js:1:14712)
at async Se (/metamask/background-8.js:1:10857)
...
(1 additional frame(s) were not displayed)
```
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
Start by locating the SelectedNetworkController state migration behind the background-2.js and background-0.js stack frames, then inspect how perDomainNetwork is handled when older state is loaded. Reproduce the Sentry failure and add coverage for the missing-field case; done means migration completes without this error and the regression is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100