-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
What is this about?
Two issues have surfaced that relate to enabled network state:
- [Bug]: 'This network is deprecated' alert appearing on non-deprecated network [REMOVE ALERT] #36992
- [Sentry] Error: No custom network client was found with the ID [ID] #33432
For 1, the report states that the toast persists and blocks signing a confirmation.
For 2, there are many instances of the error appearing. When the error appears on app open, we have reports that the error blocks users from opening Extension without reinstall
Plausible cause is that the NetworkEnablementController does not check for deprecated networks. The Controller was introduced here with a migration in the client added here.
- Start using SelectedNetworkClient for blocktracker (PR)
- 'No Custom network found with the ID' oldest version occurrence on Sentry 11.16.13, released June 22
- Goerli deprecation 11.16.0 May 21, 2024 fix: deprecating more networks #23695
- Migration to NetworkEnablementController
- Rolled out in 13.5 to 1% and paused on Oct 20, 13.6 100% on Oct 29
- Increase in reports
- Increase since Mid-September (Sentry)
- Reports on Network deprecated 13.5 onwards (Oct 20)
- Locked out with chain id not found error
- Banner for issue 1 is expected to appear for deprecated network. Statelogs shared here for issue 2 include Goerli
Hypotheses
- enabledNetworkMap still has Goerli
0x5set as true in state - When MetaMask is open and a feature calls an RPC for All networks, deprecated networks are also called as they are not cleaned from enabledNetworks. These updates might all be attempted for a deprecated network
- Poll account balances
- Fetch token prices
- Auto-detect tokens
- Fetch token lists
- Fetch currency exchange rates
- Consolidation into the NetworkEnablementController might have actually already reduced occurrence, although the error still appears on 13.7
- When opening MetaMask from a dapp connection or confirmation request, SelectedNetworkController
NetworkController.getNetworkClientByIddoes not check Network RPC from another controller or service that checks for deprecated networks. It does not use enabledNetworkMap but also does not have it's own mechanism to filter for deprecated networks
Impact
Impacts users that have updated but not reinstalled since May 2024. We don't know if severity is the same for these users. Severity is impacted by whether how Extension is opened, from a dapp (uses SelectedNetworkController) or from favicon, which still uses other controllers that don't check for deprecated networks.
Severity varies
- Select users are unable to confirm a transaction
- Select users are unable to open Extension (past the error screen)
- No noticeable impact
Cursor Conclusion
-
v13.5.0 actually REDUCED the polling errors because the selector automatically filtered out deprecated networks. However, it created/exposed NEW issues:
-
Deprecated networks stuck in enabledNetworkMap → Persistent banner
-
Domain mappings with deprecated network client IDs → Lockout errors (different error than polling)
-
The Sentry decrease confirms Migration 171's filtering worked for polling, but users are now hitting different code paths that don't have the same protection.
Scenario
No response
Design
No response
Technical Details
No response
Threat Modeling Framework
No response
Acceptance Criteria
No response
Stakeholder review needed before the work gets merged
- Engineering (needed in most cases)
- Design
- Product
- QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- Security
- Legal
- Marketing
- Management (please specify)
- Other (please specify)
References
No response