Skip to content

Conversation

@seaona
Copy link
Member

@seaona seaona commented Mar 28, 2025

Description

Fixes a race condition when we create a Solana account and immediately switch to Solana Mainnet network. The problem is that the account is not yet loaded when we perform the network switch, making the dialog for "you need a Solana accoun" to sometimes appear, and obfuscate the next action make the test fail with the error ElementClickInterceptedError:

Screenshot from 2025-03-28 07-57-49

Failure: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/134203/workflows/554e280c-2fa9-4dff-8652-0398b8ab80a0/jobs/4697627/tests

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Check ci run with ff flask enabled: https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/134219/workflows/52539bc9-bc6d-4d18-8fe6-fbdd51f48463/jobs/4697818

Screenshot from 2025-03-28 08-17-21

Screenshots/Recordings

See dialog for "you need a Solana account" obfuscating the home page

image

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.

@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-qa QA team label Mar 28, 2025
@seaona seaona self-assigned this Mar 28, 2025
accountName: 'Solana 1',
});
}
await headerComponent.check_accountLabel('Solana 1');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this ensures that we have loaded the solana account in the wallet before proceeding to the next step

@seaona seaona added the area-qa Relating to QA work (Quality Assurance) label Mar 28, 2025
@seaona seaona marked this pull request as ready for review March 28, 2025 07:18
@seaona seaona enabled auto-merge March 28, 2025 08:03
@metamaskbot
Copy link
Collaborator

Builds ready [64d0f24]
UI Startup Metrics (1193 ± 47 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1193108013354712251268
load1038945116248956998
domContentLoaded1032937115648952992
domInteractive16133651629
firstPaint7551591168392264982
backgroundConnect1166410910
firstReactRender20144152033
getState11435768
initialActions001001
loadScripts81672790848850902
setupStore8514278
WebpackHomeuiStartup1006820160989990997
load856569103563876935
domContentLoaded850561101864871923
domInteractive17136391538
firstPaint633671161333868894
backgroundConnect171184101539
firstReactRender14133131425
getState7415289
initialActions001000
loadScripts84755097163870927
setupStore7514189
FirefoxBrowserifyHomeuiStartup13721201197316214051800
load12341054181115612831636
domContentLoaded12341054181115612831636
domInteractive9940166248896
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect23165472433
firstReactRender22194242433
getState7442578
initialActions001001
loadScripts12121036178515312561608
setupStore6436467
WebpackHomeuiStartup9828431474150887954
load8627401308134816957
domContentLoaded8617391308134816956
domInteractive118361662514986
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect211274112441
firstReactRender18164031923
getState8453778
initialActions001001
loadScripts8457261281131828974
setupStore94631178
Bundle size diffs
  • background: 0 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 0 Bytes (0%)

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the fix !

@seaona seaona added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit 4ffc264 Mar 28, 2025
152 checks passed
@seaona seaona deleted the solana-acct-race-condition branch March 28, 2025 09:10
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2025
@metamaskbot metamaskbot added the release-12.17.0 Issue or pull request that will be included in release 12.17.0 label Mar 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-qa Relating to QA work (Quality Assurance) flaky tests release-12.17.0 Issue or pull request that will be included in release 12.17.0 team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants