Skip to content

fix: migration 196 remove exception missing nativeAssetIdentifiers#40764

Merged
davidmurdoch merged 1 commit intomainfrom
fix/remove-exception-migration-196-missing-nativeAssetIdentifiers
Mar 11, 2026
Merged

fix: migration 196 remove exception missing nativeAssetIdentifiers#40764
davidmurdoch merged 1 commit intomainfrom
fix/remove-exception-migration-196-missing-nativeAssetIdentifiers

Conversation

@maxime-oe
Copy link
Contributor

@maxime-oe maxime-oe commented Mar 10, 2026

Description

Open in GitHub Codespaces

The PR fixes two cases that we treated as exception (expected to never happen) but are not:

  • Absence of the nativeAssetIdentifiers : This field was created recently (1-2 months ago) but I thought it would be initialized to an empty object for new users, but I didn't realize migrations actually run before controller init.
  • Absence of the NetworkEnablementController  : That one confused me even more because I thought that a controller should always be assumed to be present. The NetworkEnablementController (as opposed to NetworkController) is fairly recent (7 months) and my understanding is that the message is triggered by old users.

Changelog

CHANGELOG entry: remove thrown exceptions in migration 196 when NetworkEnablementController is absent or NetworkEnablementController.nativeAssetIdentifiers is missing.

Related issues

Fixes: #40788

Manual testing steps

  1. Go to this page...

(if we want to test it since it is a log message thing)

  • Reset data.
  • Find a version of the Extension prior the creation of NetworkEnablementController and install it.
  • Update to latest.
  • Check if the error message will appears in the logs.

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Low risk: changes only reduce Sentry noise by no longer capturing exceptions for optional/missing migration state, without altering the actual migration transformation logic.

Overview
Migration 196 no longer calls captureException when NetworkEnablementController is absent or when NetworkEnablementController.nativeAssetIdentifiers is missing; it now silently no-ops in these cases while still reporting type mismatches.

Tests for migration 196 are updated to assert that no exception is captured for these missing-state scenarios.

Written by Cursor Bugbot for commit 4edc86c. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbot metamaskbot added the team-networks PRs from the Networks team label Mar 10, 2026
@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 10, 2026

Builds ready [42d1696]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account2822712918290291
total2822712918290291
Confirm Txconfirm_tx6015597760392360386039
total6015597760392360386039
Bridge User Actionsbridge_load_page20619222612213226
bridge_load_asset_picker23219027737272277
bridge_search_token74570278235774782
total1183108712667112431266
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14581207196711815191645
load12101004167310312571378
domContentLoaded1204999165710212521363
domInteractive301792182778
firstPaint162731170129216330
backgroundConnect21319526815215250
firstReactRender20135072133
initialActions108124
loadScripts1008804144810110621169
setupStore1363761522
numNetworkReqs362796192886
Power User HomeuiStartup4061188314900282446969899
load12801097183014713061634
domContentLoaded12601082173013912821607
domInteractive45203464935162
firstPaint234881751233272428
backgroundConnect13712787970179814195669
firstReactRender26185162736
initialActions106112
loadScripts1037873147512810611341
setupStore1564981732
numNetworkReqs1174624343130222
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182200220220
srpButtonToSrpForm9793100397100
confirmSrpToPwForm22222302223
pwFormToMetricsScreen16161711717
metricsToWalletReadyScreen17161811718
doneButtonToHomeScreen61359663416624634
openAccountMenuToAccountListLoaded293529302941429412941
total393439273938439363938
Onboarding New WalletcreateWalletToSocialScreen2192182201220220
srpButtonToPwForm1091051112111111
createPwToRecoveryScreen889099
skipBackupToMetricsScreen36343823738
agreeButtonToOnboardingSuccess17171701717
doneButtonToAssetList600471783116672783
total989858117811810591178
Asset DetailsassetClickToPriceChart1321261354135135
total1321261354135135
Solana Asset DetailsassetClickToPriceChart77758027780
total77758027780
Import Srp HomeloginToHomeScreen1928187619944219261994
openAccountMenuAfterLogin44385464354
homeAfterImportWithNewWallet1835427281485823152814
total39002391525499243635254
Send TransactionsopenSendPageFromHome20182322223
selectTokenToSendFormLoaded20182112021
reviewTransactionToConfirmationPage8468468481847848
total8868848913886891
SwapopenSwapPageFromHome26213242732
fetchAndDisplaySwapQuotes268826842691226912691
total271427052720627182720
🌐 Dapp Page Load Benchmarks

Current Commit: 42d1696 | Date: 3/10/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±41ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±39ms) 🟢 | historical mean value: 721ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 81ms (±14ms) 🟢 | historical mean value: 82ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 41ms 1.02s 1.36s 1.07s 1.36s
domContentLoaded 733ms 39ms 712ms 1.03s 756ms 1.03s
firstPaint 81ms 14ms 60ms 208ms 88ms 208ms
firstContentfulPaint 81ms 14ms 60ms 208ms 88ms 208ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: -64 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@maxime-oe maxime-oe force-pushed the fix/remove-exception-migration-196-missing-nativeAssetIdentifiers branch from 42d1696 to f81faf5 Compare March 11, 2026 09:17
@maxime-oe maxime-oe marked this pull request as ready for review March 11, 2026 09:26
@maxime-oe maxime-oe force-pushed the fix/remove-exception-migration-196-missing-nativeAssetIdentifiers branch from f81faf5 to 4edc86c Compare March 11, 2026 09:31
@sonarqubecloud
Copy link

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 11, 2026

Builds ready [4edc86c]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28326331720276317
total28326331720276317
Confirm Txconfirm_tx599459925996259955996
total599459925996259955996
Bridge User Actionsbridge_load_page20819622110215221
bridge_load_asset_picker2342262386238238
bridge_search_token75470678529783785
total1218118112382312351238
🔌 Startup Benchmarks

⚠️ Missing data: chrome/browserify/startupPowerUserHome

BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14871289191710915571675
load12341031160110512621417
domContentLoaded12271023159610312571393
domInteractive3118128212685
firstPaint163741403146205301
backgroundConnect21819628012222244
firstReactRender20133842130
initialActions107114
loadScripts1025821139210210531196
setupStore1373051520
numNetworkReqs362793192786
🧭 User Journey Benchmarks

⚠️ Missing data: chrome/browserify/userJourneyAssets

BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182201219220
srpButtonToSrpForm96959719697
confirmSrpToPwForm22222202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151601616
doneButtonToHomeScreen67559483298750832
openAccountMenuToAccountListLoaded2931290529441629442944
total3994391241058540484105
Onboarding New WalletcreateWalletToSocialScreen2172162171217217
srpButtonToPwForm1031001062104106
createPwToRecoveryScreen888088
skipBackupToMetricsScreen35333613536
agreeButtonToOnboardingSuccess15151601516
doneButtonToAssetList4774684856479485
total8548478595858859
Import Srp HomeloginToHomeScreen22601992256019823942560
openAccountMenuAfterLogin72501062185106
homeAfterImportWithNewWallet2498239525767725752576
total4829473749177449174917
Send TransactionsopenSendPageFromHome33264263742
selectTokenToSendFormLoaded23193052730
reviewTransactionToConfirmationPage1017847138321611501383
total1081891148223612211482
SwapopenSwapPageFromHome371950135050
fetchAndDisplaySwapQuotes269626872707727022707
total2733271427491327432749
🌐 Dapp Page Load Benchmarks

Current Commit: 4edc86c | Date: 3/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±76ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 758ms (±73ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±11ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 76ms 1.02s 1.36s 1.30s 1.36s
domContentLoaded 758ms 73ms 714ms 1.04s 970ms 1.04s
firstPaint 82ms 11ms 64ms 176ms 92ms 176ms
firstContentfulPaint 82ms 11ms 64ms 176ms 92ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: -156 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@metamaskbotv2
Copy link
Contributor

metamaskbotv2 bot commented Mar 11, 2026

Builds ready [4edc86c]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account28326331720276317
total28326331720276317
Confirm Txconfirm_tx599459925996259955996
total599459925996259955996
Bridge User Actionsbridge_load_page20819622110215221
bridge_load_asset_picker2342262386238238
bridge_search_token75470678529783785
total1218118112382312351238
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Standard HomeuiStartup14871289191710915571675
load12341031160110512621417
domContentLoaded12271023159610312571393
domInteractive3118128212685
firstPaint163741403146205301
backgroundConnect21819628012222244
firstReactRender20133842130
initialActions107114
loadScripts1025821139210210531196
setupStore1373051520
numNetworkReqs362793192786
Power User HomeuiStartup5080211615634254360179067
load13371155273519213751596
domContentLoaded13191148263518313511575
domInteractive3320119193266
firstPaint214791307139276354
backgroundConnect190530412345214825255107
firstReactRender28195173240
initialActions104113
loadScripts1083935233816510981310
setupStore1664681930
numNetworkReqs1356826843143236
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192182201219220
srpButtonToSrpForm96959719697
confirmSrpToPwForm22222202222
pwFormToMetricsScreen15151501515
metricsToWalletReadyScreen16151601616
doneButtonToHomeScreen67559483298750832
openAccountMenuToAccountListLoaded2931290529441629442944
total3994391241058540484105
Onboarding New WalletcreateWalletToSocialScreen2172162171217217
srpButtonToPwForm1031001062104106
createPwToRecoveryScreen888088
skipBackupToMetricsScreen35333613536
agreeButtonToOnboardingSuccess15151601516
doneButtonToAssetList4774684856479485
total8548478595858859
Asset DetailsassetClickToPriceChart1239614220138142
total1239614220138142
Solana Asset DetailsassetClickToPriceChart78767917979
total78767917979
Import Srp HomeloginToHomeScreen22601992256019823942560
openAccountMenuAfterLogin72501062185106
homeAfterImportWithNewWallet2498239525767725752576
total4829473749177449174917
Send TransactionsopenSendPageFromHome33264263742
selectTokenToSendFormLoaded23193052730
reviewTransactionToConfirmationPage1017847138321611501383
total1081891148223612211482
SwapopenSwapPageFromHome371950135050
fetchAndDisplaySwapQuotes269626872707727022707
total2733271427491327432749
🌐 Dapp Page Load Benchmarks

Current Commit: 4edc86c | Date: 3/11/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±76ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 758ms (±73ms) 🟢 | historical mean value: 729ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 82ms (±11ms) 🟢 | historical mean value: 84ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 76ms 1.02s 1.36s 1.30s 1.36s
domContentLoaded 758ms 73ms 714ms 1.04s 970ms 1.04s
firstPaint 82ms 11ms 64ms 176ms 92ms 176ms
firstContentfulPaint 82ms 11ms 64ms 176ms 92ms 176ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: -156 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

@davidmurdoch davidmurdoch added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit c4b8960 Mar 11, 2026
344 of 348 checks passed
@davidmurdoch davidmurdoch deleted the fix/remove-exception-migration-196-missing-nativeAssetIdentifiers branch March 11, 2026 16:58
@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2026
@metamaskbot metamaskbot added the release-13.23.0 Issue or pull request that will be included in release 13.23.0 label Mar 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.23.0 Issue or pull request that will be included in release 13.23.0 size-S team-networks PRs from the Networks team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: NetworkEnablementController migration error messages

5 participants