MetaMask / MetaMask/metamask-extension
[Bug]: Networks - After deleting a custom RPC for a default network and reloading the wallet I get `Error: `networksMetadata` had invalid network client IDs, which have been removed`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
### Describe the bug
After deleting a custom RPC for a default network and reloading the wallet I get `Error: `networksMetadata` had invalid network client IDs, which have been removed`
### Expected behavior
No error
### Screenshots/Recordings
https://github.com/user-attachments/assets/9943d07d-f94b-4c5c-91ba-3a199bc97724
### Steps to reproduce
1. Open Networks menu
2. On Ethereum Mainnet add another RPC
3. Select Infura again
4. Now delete this new custom RPC
5. Close the wallet
6. Click Reload
7. Open console
8. See error
### Error messages or log output
```shell
```
### Where was this bug found?
Live version (from official store)
### Version
13.35.0
### Build type
None
### Browser
Chrome
### Operating system
MacOS
### Hardware wallet
_No response_
### Additional context
_No response_
### Severity
_No response_
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
Reproduce the issue through the Networks menu using Ethereum Mainnet: add another RPC, select Infura, delete it, close the wallet, reload, and inspect the console. Trace the reload handling for networksMetadata and confirm the completed fix no longer reports invalid network client IDs after deleting the custom RPC.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100