-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat: Add installation version and date context to migration error Sentry tags #39633
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add sentryTags to migration errors to help identify whether users should have had a vault backup when encountering storage corruption. Tags include corruption.preMigrationVersion and corruption.backupShouldExist, which are extracted and sent via the critical error page's error report flow.
|
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. |
e172bd7 to
b2943c5
Compare
b2943c5 to
dd1565b
Compare
dd1565b to
d8ed130
Compare
✨ Files requiring CODEOWNER review ✨👨🔧 @MetaMask/extension-platform (2 files, +8 -2)
🕵️ @MetaMask/extension-privacy-reviewers (1 files, +4 -0)
🧪 @MetaMask/qa (3 files, +12 -2)
|
d8ed130 to
8bf38e4
Compare
8bf38e4 to
0fe531b
Compare
…ntry tags Move firstTimeInfo from top-level state to AppMetadataController to leverage automatic IndexedDB backup. Include corruption.installVersion and corruption.installDate in Sentry tags when migration errors occur.
0fe531b to
206c965
Compare
Builds ready [206c965]
UI Startup Metrics (1520 ± 187 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
Update the state logs expected structure to include the new firstTimeInfo field that was moved to AppMetadataController.
Builds ready [3c303dd]
UI Startup Metrics (1315 ± 120 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
|
The base branch was changed.
Builds ready [4430f46]
UI Startup Metrics (1339 ± 124 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [cb5912c]
UI Startup Metrics (1317 ± 125 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [034ad8c]
UI Startup Metrics (1320 ± 116 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
The firstTimeInfo.version is set to the current MetaMask version at installation time and changes with every release, so it should be ignored in fixture validation like firstTimeInfo.date. Co-authored-by: Cursor <[email protected]>
Builds ready [3b2543f]
UI Startup Metrics (1317 ± 104 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This PR is built on top of: #39523 which is meant to be merged first.
This PR moves
firstTimeInfo(installation version and date) from a top-level state property intoAppMetadataController. This architectural change ensuresfirstTimeInfois automatically backed up to IndexedDB (sinceAppMetadataControlleris inbackedUpStateKeys) and fixes a bug wherefirstTimeInfowas never properly persisted in split storage mode. The Sentry migration error tags now includecorruption.installVersionandcorruption.installDatefor better diagnostics.Changelog
CHANGELOG entry: null
Related issues
Helps investigation of: #31159
Helps investigation of: #31117
Manual testing steps
yarn startdatakey fromchrome.storage.localwhile keepingmetacorruption.installVersion: the version of the app when it got installedcorruption.installDate: the date when the app got installedScreenshots/Recordings
Tags are visible in Sentry

firstTimeInfoare now moved toAppMetadataControllerPre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it introduces a new state migration (v192) that moves/deletes persisted keys and adjusts startup migration error handling to perform async backup reads; mistakes could affect persisted state shape or boot-time diagnostics.
Overview
Consolidates install metadata by moving
firstTimeInfofrom the top-level persisted state intoAppMetadataController.firstTimeInfovia new migration192, including validation/deletion of malformed values and ensuring split-storage cleanup viachangedControllers.Records
firstTimeInfothroughAppMetadataController.maybeRecordFirstTimeInfoduring controller setup (removing the oldrecordFirstTimeInfoinit-state mutation), and expands migration failure errors to includecorruption.installVersion/corruption.installDateSentry tags with a fallback read from the IndexedDB backup.Updates controller metadata/tests and refreshes E2E fixtures/snapshots/validation to reflect the new storage location and migration version bump to
192.Written by Cursor Bugbot for commit 3b2543f. This will update automatically on new commits. Configure here.