-
Notifications
You must be signed in to change notification settings - Fork 5.4k
chore: Bump Snaps packages #37971
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
chore: Bump Snaps packages #37971
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✨ Files requiring CODEOWNER review ✨🫰 @MetaMask/core-platform (5 files, +77 -4)
🧩 @MetaMask/extension-devs (5 files, +10 -5)
📜 @MetaMask/policy-reviewers (5 files, +10 -5)
Tip Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers. 🔗 @MetaMask/supply-chain (5 files, +10 -5)
|
|
@metamaskbot update-policies |
Builds ready [bd56653]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [38550f0]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [459e650]
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
459e650 to
312ec52
Compare
Builds ready [312ec52]
UI Startup Metrics (1258 ± 106 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
| initMessenger.subscribe('OnboardingController:stateChange', listener); | ||
|
|
||
| await promise; | ||
| } |
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.
Bug: Event listener not unsubscribed on error paths
In ensureOnboardingComplete, the OnboardingController:stateChange listener is only unsubscribed when completedOnboarding becomes true. If the promise is rejected, cancelled, or the await is interrupted, the listener remains subscribed indefinitely, causing a memory leak and continued event processing. The listener should be properly cleaned up in all execution paths, such as using a try-finally block or similar error handling mechanism.
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.
We control the promise, so it will only ever resolve.
| initMessenger.subscribe('OnboardingController:stateChange', listener); | ||
|
|
||
| await promise; | ||
| } |
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.
Bug: Race condition causes hanging if onboarding completes before listener subscribes
In ensureOnboardingComplete, there's a window between checking completedOnboarding state (line 103) and subscribing to the event listener (line 120). If onboarding completes during this window and no further state changes occur, the promise will hang indefinitely because the listener only resolves on future state changes. The function should re-check the state after subscribing or use a mechanism that handles already-completed onboarding.
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'm assuming that onboarding cannot happen while the controllers are initializing so this is a moot point
cryptodev-2s
left a comment
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.
LGTM!
Builds ready [1c642df]
UI Startup Metrics (1215 ± 92 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [6503485]
UI Startup Metrics (1229 ± 96 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Mrtenz
left a comment
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.
Cursor has some comments that seem worth addressing.
6503485 to
62f9d5b
Compare
|
@metamaskbot update-policies |
|
No policy changes |
Builds ready [62f9d5b]
UI Startup Metrics (1249 ± 97 ms)
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Description
This bumps Snaps packages to the latest version. Notable changes include:
snap_setStateoperationsclientVersionsin the registryChangelog
CHANGELOG entry: Fixed a rare issue where Snaps updating state rapidly would lose data
Note
Bumps Snaps packages, requires onboarding completion before Snap operations, and passes extension client version to the Snaps registry; updates messengers, tests, and LavaMoat policy.
OnboardingController:getStateand subscribe toOnboardingController:stateChangeinSnapControllerInitmessenger.ensureOnboardingCompletetoSnapController.clientConfigwith{ type: 'extension', version }, parsingMETAMASK_VERSIONto strip prerelease tags.@metamask/snaps-controllersto^17.0.0and@metamask/snaps-rpc-methodsto^14.1.1(lockfile updates incl.@metamask/snaps-registry@^3.3.0).@metamask/eth-qr-keyring>async-mutexunder@metamask/snaps-rpc-methods.ensureOnboardingCompletewiring andclientConfig.versionbehavior.Written by Cursor Bugbot for commit 62f9d5b. This will update automatically on new commits. Configure here.