-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: Remove invalid providerConfig id #26310
Conversation
cc38f47
to
9dfec33
Compare
it('does nothing if obsolete properties are not set and providerConfig is set to undefined', async () => { | ||
const oldState = { | ||
NetworkController: { | ||
// This should be impossible because `undefined` cannot be returned from persisted state, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discovered this when investigating this test failure: https://github.com/MetaMask/metamask-extension/actions/runs/10216054639/job/28266703200
@@ -40,7 +41,7 @@ function removeObsoleteSnapControllerState( | |||
if (!hasProperty(state, 'SnapController')) { | |||
return; | |||
} else if (!isObject(state.SnapController)) { | |||
global.sentry.captureException( | |||
global.sentry?.captureException?.( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating these to follow the convention in other migrations of not assuming this global is set. It should always be set in production, but one of the migrator tests doesn't set it and can blow up here.
Discovered while investigating this test failure:
https://github.com/MetaMask/metamask-extension/actions/runs/10216054639/job/28266703200
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #26310 +/- ##
===========================================
+ Coverage 70.04% 70.05% +0.01%
===========================================
Files 1411 1411
Lines 50031 50050 +19
Branches 13812 13822 +10
===========================================
+ Hits 35042 35061 +19
Misses 14989 14989 ☔ View full report in Codecov by Sentry. |
Builds ready [27d6dcc]
Page Load Metrics (284 ± 270 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Remove invalid `providerConfig.id` state. This was one possible explanation for some Sentry errors that we have been encountering in production. The diagnostic state attached to the error was not sufficient to confirm that this was the cause. Relates to #26309
27d6dcc
to
90c5763
Compare
Quality Gate passedIssues Measures |
Builds ready [90c5763]
Page Load Metrics (230 ± 234 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
Remove invalid
providerConfig.id
state. This was one possible explanation for some Sentry errors that we have been encountering in production. The diagnostic state attached to the error was not sufficient to confirm that this was the cause.Related issues
Relates to #26309 and #26320
Manual testing steps
N/A
Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist