Skip to content

Conversation

seaona
Copy link
Member

@seaona seaona commented Oct 10, 2025

Description

Investigation:

  • Anti-pattern with findElement and then asserting things later on, causing ElementStale error. See here
  • An error with the waitUntil function param, passing Ìnfinity which results in a null value, making the function run only once, then that's prone to failures, as there's no more 'wait until', rather just run the func once. See here
  • Whenever we corrupt the vault by destroying the database, sometimes when we click Recover, the MM window is closed, leaving just the Extensions page open. Still unclear why this happens - after adding several delays on the spec, still couldn't find something that stabilizes this, it might be a race condition on the application side, so opened a bug for further investigation
    [Bug]: Restore Vault - Race condition where page is auto closed after confirming Restore #36916
image

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Check ci

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

Stabilizes vault corruption E2E tests by increasing timeouts, refining wait/polling, and hardening recovery click/window handling to avoid race conditions and stale elements.

  • E2E Tests (test/e2e/tests/vault-corruption/vault-corruption.spec.ts):
    • Timeouts/Waiting:
      • Set suite timeout to 120000 ms.
      • Tweak waitForVaultRestorePage polling to { interval: 100, timeout: 10000 }.
    • Recovery Flow (clickRecover):
      • Use driver.clickElement('#critical-error-button') instead of finding then clicking.
      • On confirm: add delay, handle tab/window re-targeting (switchToWindowWithTitle, fallback openNewPage + navigate), and assert #critical-error-button is absent (avoid stale state checks).
      • On dismiss: ensure #critical-error-button remains clickable.
    • Stability: Reduce flakiness by avoiding stale element checks and handling extension tab closures during recovery.

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

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 Oct 10, 2025
@seaona seaona self-assigned this Oct 10, 2025
@seaona seaona added flaky tests no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 10, 2025
cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: cfc977a | Date: 10/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±72ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 734ms (±68ms) 🟢 | historical mean value: 736ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 82ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 72ms 1.01s 1.33s 1.29s 1.33s
domContentLoaded 734ms 68ms 700ms 1.01s 956ms 1.01s
firstPaint 75ms 11ms 56ms 164ms 84ms 164ms
firstContentfulPaint 75ms 11ms 56ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [cfc977a]
UI Startup Metrics (1225 ± 54 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1225110013565412581313
load105395811484810871140
domContentLoaded104695311434710791134
domInteractive1813124111727
firstPaint77074116140810781144
backgroundConnect2522392827255264
firstReactRender2818159163142
getState1354171529
initialActions50689624
loadScripts80071490047833890
setupStore1063451021
WebpackHomeuiStartup819698110573834981
load64458394074667779
domContentLoaded63757493174662769
domInteractive15113971435
firstPaint16657711141189592
backgroundConnect20115482534
firstReactRender25166283034
getState74193911
initialActions2011226
loadScripts63457292072661762
setupStore74142911
FirefoxBrowserifyHomeuiStartup13521202178212014061616
load1152103713587512061296
domContentLoaded1151103713587512061296
domInteractive94332905194225
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2818121143155
firstReactRender29245353140
getState9325426521
initialActions20324210
loadScripts1131102113037111801272
setupStore11413921644
WebpackHomeuiStartup15931381208312316421853
load1387122816518914241583
domContentLoaded1386122816518914231582
domInteractive1002937556102227
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect352097153874
firstReactRender34278383644
getState9316119626
initialActions30224213
loadScripts1359121016138614041551
setupStore11415318736
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.65 KiB (-0.17%)
  • ui: 2 Bytes (0%)
  • common: 14 Bytes (0%)

cursor[bot]

This comment was marked as outdated.

@github-actions github-actions bot added size-XS and removed size-M labels Oct 10, 2025
@github-actions github-actions bot added size-M and removed size-XS labels Oct 10, 2025
cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: e663508 | Date: 10/10/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±69ms) 🟢 | historical mean value: 736ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±11ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.01s 1.32s 1.26s 1.32s
domContentLoaded 732ms 69ms 694ms 1000ms 931ms 1000ms
firstPaint 75ms 11ms 60ms 164ms 84ms 164ms
firstContentfulPaint 75ms 11ms 60ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [e663508]
UI Startup Metrics (1205 ± 59 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1205109213785912471314
load104294511985310831127
domContentLoaded103693911925210751122
domInteractive17134271638
firstPaint71179120142010701124
backgroundConnect2512392878254268
firstReactRender25195672742
getState1153761224
initialActions50305514
loadScripts79170091949829874
setupStore95334916
WebpackHomeuiStartup8237061126818371037
load63257594377633876
domContentLoaded62556993577626866
domInteractive15116281436
firstPaint19356938201185720
backgroundConnect22104672636
firstReactRender281669113160
getState832841018
initialActions2017347
loadScripts62256792474624855
setupStore84193914
FirefoxBrowserifyHomeuiStartup14081196191013114671713
load1209104115389112781353
domContentLoaded1208104015389112781353
domInteractive1033231757103255
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3219208243253
firstReactRender30254843139
getState9320222525
initialActions20253210
loadScripts1184102215178912461330
setupStore9412617729
WebpackHomeuiStartup15501331199912215931794
load1348118615928513861533
domContentLoaded1347118615928513851533
domInteractive963137957102215
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect311884133558
firstReactRender352698133775
getState726210529
initialActions5017318212
loadScripts1324117015638213601499
setupStore10414216732
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.65 KiB (-0.17%)
  • ui: 13 Bytes (0%)
  • common: 14 Bytes (0%)

confirm: boolean;
}) {
// click the Recovery/Reset button
const recoveryButton = await driver.findClickableElement(
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 is an anti-pattern which can cause the element being stale, when we try to assert its state later on, if the element refreshed. See example of failure:

image

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 402b139 | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±75ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 742ms (±70ms) 🟢 | historical mean value: 737ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±10ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 75ms 1.02s 1.37s 1.31s 1.37s
domContentLoaded 742ms 70ms 704ms 1.02s 970ms 1.02s
firstPaint 78ms 10ms 64ms 168ms 88ms 168ms
firstContentfulPaint 78ms 10ms 64ms 168ms 88ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [402b139]
UI Startup Metrics (1232 ± 70 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1232110814387012691356
load106895312416611131201
domContentLoaded106294712366711081196
domInteractive1813135131638
firstPaint729139123142510841178
backgroundConnect2502372798253270
firstReactRender24185062438
getState1147791325
initialActions40768513
loadScripts81870698766868951
setupStore86223915
WebpackHomeuiStartup814702114473832989
load632574100079631843
domContentLoaded62556999579624834
domInteractive15115181336
firstPaint18754837175188590
backgroundConnect21114362631
firstReactRender26167293134
getState832731011
initialActions2011235
loadScripts62256798477622821
setupStore84273914
FirefoxBrowserifyHomeuiStartup14381223198314814921790
load12231066163210213051395
domContentLoaded12231066163210213051395
domInteractive1043446966103282
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect292098123252
firstReactRender30264133236
getState7211312617
initialActions5120821223
loadScripts1201104816099912761372
setupStore1046713755
WebpackHomeuiStartup15491373205811615961828
load1351120116568913991541
domContentLoaded1351120116568913981541
domInteractive923128938101156
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3218105163468
firstReactRender352778113570
getState62527514
initialActions30547216
loadScripts1327118316298413701499
setupStore12314818746
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -7.3 KiB (-0.16%)
  • ui: 1.55 KiB (0.02%)
  • common: 4.98 KiB (0.06%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: eafe0dc | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 732ms (±68ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±12ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 71ms 1.01s 1.32s 1.26s 1.32s
domContentLoaded 732ms 68ms 696ms 1.00s 930ms 1.00s
firstPaint 76ms 12ms 60ms 172ms 88ms 172ms
firstContentfulPaint 76ms 12ms 60ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [f3874d9]
UI Startup Metrics (1249 ± 68 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1249112814686812971378
load107297112176211221192
domContentLoaded106392212136311151187
domInteractive18135671739
firstPaint716131120842410811167
backgroundConnect25523939917258275
firstReactRender2618106102739
getState1658091932
initialActions51538614
loadScripts81668295762871947
setupStore962021014
WebpackHomeuiStartup845718111466864970
load63758292668645811
domContentLoaded62957591666636804
domInteractive16126691437
firstPaint17457948184174655
backgroundConnect21115572635
firstReactRender271797103236
getState941731113
initialActions309247
loadScripts62657490564634792
setupStore1051931215
FirefoxBrowserifyHomeuiStartup15031261209213215731731
load12641074171310413241420
domContentLoaded12641073171210413241420
domInteractive1073337959109263
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3622150153856
firstReactRender30256453236
getState95486918
initialActions51698416
loadScripts12401057168310313011395
setupStore13670121152
WebpackHomeuiStartup15821375231414116531838
load13551190180510814301556
domContentLoaded13541190180510814301556
domInteractive1003138266100323
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3921160194269
firstReactRender33258093446
getState944651015
initialActions51589325
loadScripts13291175167410213991519
setupStore146198251061
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.88 KiB (-1.56%)
  • ui: 9.45 KiB (0.15%)
  • common: 69.37 KiB (0.83%)

await prompt.accept();
await driver.switchToWindowWithTitle(
WINDOW_TITLES.ExtensionInFullScreenView,
);
Copy link
Member Author

Choose a reason for hiding this comment

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

we switch to the Extension page to make sure we are in the correct window, as sometimes the window is closed and re-opened, causing the error web view has been discarded

@seaona seaona added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed and removed no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 16, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: e92bdae | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 990ms (±79ms) 🟢 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 692ms (±81ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±119ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 990ms 79ms 944ms 1.44s 1.22s 1.44s
domContentLoaded 692ms 81ms 652ms 1.21s 906ms 1.21s
firstPaint 85ms 119ms 60ms 1.27s 84ms 1.27s
firstContentfulPaint 85ms 119ms 60ms 1.27s 84ms 1.27s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [e92bdae]
UI Startup Metrics (1240 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1240112615377212811405
load106196013956710901195
domContentLoaded105695513916610821190
domInteractive18136181736
firstPaint65771122542610681137
backgroundConnect2522372716255264
firstReactRender25184662641
getState1453771829
initialActions709212616
loadScripts809699114866832934
setupStore1062331019
WebpackHomeuiStartup861726107069886994
load65758390675664823
domContentLoaded65057889474659816
domInteractive16115281438
firstPaint17755882167195608
backgroundConnect21103772533
firstReactRender26176693237
getState931531114
initialActions3015349
loadScripts64757688373657814
setupStore1061531214
FirefoxBrowserifyHomeuiStartup14521265190611715211645
load1223107314348412911354
domContentLoaded1223107314328412911354
domInteractive1023331351109232
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3421276273645
firstReactRender29255453138
getState84434815
initialActions41314411
loadScripts1200105614158312631336
setupStore136125161054
WebpackHomeuiStartup15851374235613516171825
load1351119016939313751539
domContentLoaded1350119016939313741538
domInteractive104323837397339
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect4020183224384
firstReactRender342782103550
getState11415219918
initialActions6214816313
loadScripts1324117316288813481518
setupStore156178231252
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.72 KiB (-1.56%)
  • ui: 9.45 KiB (0.15%)
  • common: 69.4 KiB (0.83%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: ccbb5c6 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±69ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 733ms (±67ms) 🟢 | historical mean value: 737ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 81ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 69ms 1.01s 1.31s 1.26s 1.31s
domContentLoaded 733ms 67ms 699ms 1.00s 935ms 1.00s
firstPaint 76ms 11ms 60ms 168ms 84ms 168ms
firstContentfulPaint 76ms 11ms 60ms 168ms 84ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [ccbb5c6]
UI Startup Metrics (1253 ± 69 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1253112814526912931369
load107696212376311141185
domContentLoaded107095912266211061180
domInteractive1914146141732
firstPaint67092123243210881158
backgroundConnect2532412857256267
firstReactRender25185962641
getState1564771833
initialActions50426614
loadScripts82271596161863931
setupStore961821016
WebpackHomeuiStartup832713107769858977
load63157888965641770
domContentLoaded62457387965633765
domInteractive16114991339
firstPaint16252584117187579
backgroundConnect20104572633
firstReactRender26166693141
getState931831114
initialActions3024347
loadScripts62157186963631763
setupStore951831113
FirefoxBrowserifyHomeuiStartup14521277207915415261773
load1209108714489112851376
domContentLoaded1209108614489112851375
domInteractive1033435958101250
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3622256263964
firstReactRender29255153039
getState12317120954
initialActions7113318418
loadScripts1188107014248812531357
setupStore146158181157
WebpackHomeuiStartup15831389212512116421825
load1355120517069314241525
domContentLoaded1355120517069314231525
domInteractive1043137375100340
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3818151194276
firstReactRender332681103359
getState10512114917
initialActions51629414
loadScripts1331118916869113981481
setupStore145189231241
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.72 KiB (-1.56%)
  • ui: 10.83 KiB (0.17%)
  • common: 69.4 KiB (0.83%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: b710796 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±90ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 737ms (±85ms) 🟢 | historical mean value: 735ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 89ms (±126ms) 🟢 | historical mean value: 80ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 90ms 999ms 1.65s 1.27s 1.65s
domContentLoaded 737ms 85ms 692ms 1.28s 940ms 1.28s
firstPaint 89ms 126ms 60ms 1.34s 88ms 1.34s
firstContentfulPaint 89ms 126ms 60ms 1.34s 88ms 1.34s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [b710796]
UI Startup Metrics (1276 ± 79 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1276115217047913081403
load108898715047111191205
domContentLoaded108398115007111141199
domInteractive1914136131726
firstPaint60285124743110801203
backgroundConnect2562422737260268
firstReactRender2819170162945
getState1766292232
initialActions60456717
loadScripts832736123669862953
setupStore1163141118
WebpackHomeuiStartup837716108567854997
load63258291868639812
domContentLoaded62457690967631806
domInteractive16116591440
firstPaint19255899186179615
backgroundConnect21104672532
firstReactRender26164373138
getState942231114
initialActions309257
loadScripts62157489865630795
setupStore1061621214
FirefoxBrowserifyHomeuiStartup14611270215812615231655
load1224108614158312921351
domContentLoaded1224108514158312921351
domInteractive1053332755109236
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3422107113953
firstReactRender30255653137
getState10418118816
initialActions6117918415
loadScripts1201106913678012671329
setupStore126139151029
WebpackHomeuiStartup15891441200212116391875
load1358119217159814241558
domContentLoaded1358119117149814241557
domInteractive95303565399185
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3719119164253
firstReactRender352678113673
getState104103111015
initialActions6111814416
loadScripts1333117616149313931530
setupStore12662111142
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.72 KiB (-1.56%)
  • ui: 10.83 KiB (0.17%)
  • common: 69.4 KiB (0.83%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 1d139e3 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.07s (±73ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 752ms (±71ms) 🟢 | historical mean value: 735ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 79ms (±12ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.07s 73ms 1.02s 1.36s 1.31s 1.36s
domContentLoaded 752ms 71ms 704ms 1.03s 983ms 1.03s
firstPaint 79ms 12ms 60ms 184ms 88ms 184ms
firstContentfulPaint 79ms 12ms 60ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [1d139e3]
UI Startup Metrics (1228 ± 55 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1228112813945512621319
load105796512125210891152
domContentLoaded105093712075310841148
domInteractive18146291640
firstPaint64087113741810511122
backgroundConnect25624134312258273
firstReactRender25185362639
getState15581101733
initialActions607811614
loadScripts80168795752833896
setupStore96293915
WebpackHomeuiStartup828708110065846988
load62557692766629815
domContentLoaded61757291764623805
domInteractive15115281437
firstPaint19354892197178667
backgroundConnect21104872733
firstReactRender2717137133234
getState941731113
initialActions308247
loadScripts61457090662621793
setupStore1051531213
FirefoxBrowserifyHomeuiStartup13951226200312614511644
load1179105215598812321329
domContentLoaded1179105215588812321328
domInteractive98332985497269
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3322244233747
firstReactRender292510583038
getState83395815
initialActions4111111312
loadScripts1157103213738012081305
setupStore12513917941
WebpackHomeuiStartup15921394199512316261910
load1359119816779114021554
domContentLoaded1359119716779114011553
domInteractive99333975999171
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3722108154266
firstReactRender34278293540
getState10411912915
initialActions52598412
loadScripts1334118116598813711518
setupStore156169231139
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.49 KiB (-1.55%)
  • ui: 11.16 KiB (0.17%)
  • common: 69.4 KiB (0.83%)

import LoginPage from '../../page-objects/pages/login-page';

describe('Vault Corruption', function () {
this.timeout(120000); // This test is very long, so we need an unusually high timeout
Copy link
Member Author

@seaona seaona Oct 16, 2025

Choose a reason for hiding this comment

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

I hit this once:

image

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 480ac88 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±73ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 739ms (±70ms) 🟢 | historical mean value: 737ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 73ms 1.01s 1.33s 1.29s 1.33s
domContentLoaded 739ms 70ms 701ms 1.00s 965ms 1.00s
firstPaint 77ms 12ms 60ms 184ms 88ms 184ms
firstContentfulPaint 77ms 12ms 60ms 184ms 88ms 184ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [480ac88]
UI Startup Metrics (1276 ± 63 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1276115614886313131388
load109598713236011281188
domContentLoaded108897013196011221181
domInteractive18146281740
firstPaint73483126444211141186
backgroundConnect25824229010263279
firstReactRender26195662643
getState1555981928
initialActions617810617
loadScripts838724106559870938
setupStore1072731015
WebpackHomeuiStartup8247111049708371023
load62557589070632846
domContentLoaded61756988169628827
domInteractive15115281334
firstPaint18054859177176596
backgroundConnect21104472532
firstReactRender26173663134
getState932131113
initialActions308257
loadScripts61556787167626816
setupStore951521113
FirefoxBrowserifyHomeuiStartup15071334194012715671809
load1264112915178513261414
domContentLoaded1263112915178513261414
domInteractive1073531758109267
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3720115144177
firstReactRender32266153339
getState13519124931
initialActions52405412
loadScripts1240111114408213031391
setupStore197190331167
WebpackHomeuiStartup15641420196810615911821
load1337116816227713831494
domContentLoaded1337116816227713831493
domInteractive973136351101254
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3621106154177
firstReactRender352682123575
getState12418022942
initialActions51678313
loadScripts1313114815637413551468
setupStore135141171147
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -70.19 KiB (-1.54%)
  • ui: 10.65 KiB (0.16%)
  • common: 69.4 KiB (0.83%)

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 50950b5 | Date: 10/16/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±71ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 737ms (±84ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±15ms) 🟢 | historical mean value: 78ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 71ms 1.01s 1.35s 1.26s 1.35s
domContentLoaded 737ms 84ms 698ms 1.29s 934ms 1.29s
firstPaint 76ms 15ms 56ms 212ms 84ms 212ms
firstContentfulPaint 76ms 15ms 56ms 212ms 84ms 212ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [50950b5]
UI Startup Metrics (1241 ± 66 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1241111215476612871329
load106691912356311171158
domContentLoaded105990712296311081155
domInteractive1913136141738
firstPaint76075117841211031143
backgroundConnect2542342859259272
firstReactRender2718164182638
getState1564871930
initialActions51709612
loadScripts81167296462862910
setupStore96273916
WebpackHomeuiStartup831715111567848989
load62857790964638783
domContentLoaded61957089962628778
domInteractive15114681437
firstPaint19254903195186694
backgroundConnect22124772734
firstReactRender271763103249
getState931531013
initialActions3012349
loadScripts61756888860626767
setupStore952531114
FirefoxBrowserifyHomeuiStartup14241240176911315011658
load1203105913598112781336
domContentLoaded1202105913588112781336
domInteractive983327944102219
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3423101133858
firstReactRender31256973245
getState9313614820
initialActions41244415
loadScripts1180104113378012491318
setupStore156139231149
WebpackHomeuiStartup15921444197210616561826
load1360121116538214201516
domContentLoaded1359121116528214201515
domInteractive1043336064106335
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3722153164169
firstReactRender352685123577
getState104108121017
initialActions5110711413
loadScripts1336119215847913951489
setupStore13681121138
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 10 Bytes (0%)

@seaona seaona marked this pull request as ready for review October 16, 2025 15:50
@seaona seaona added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed and removed no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 16, 2025
// reload and check title as quickly a possible, forever
{ interval: 0, timeout: Infinity },
// reload and check title as quickly a possible
{ interval: 100, timeout: 10000 },
Copy link
Member Author

@seaona seaona Oct 17, 2025

Choose a reason for hiding this comment

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

the Infinityvalue here is just taken as null (see last log below), then passing interval 0 and timeout of null effectively means the condition will run only once

image

with this fix, the test is less prone to errors, as we are effectively waiting for the correct title, going to the home page, as many times as needed (until reaching 10 seconds):

image
await driver.waitUntil(
      async () => {
        await driver.navigate(PAGES.HOME, { waitForControllers: false });
        const title = await driver.driver.getTitle();
        // the browser will return an error message for our UI's HOME page until
        // the extension has restarted
        return title === WINDOW_TITLES.ExtensionInFullScreenView;
      },

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, very nice fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flaky tests no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants