From 4bbcee4db0670cfdd61f4d9e1fb1c336dd5334ba Mon Sep 17 00:00:00 2001 From: seaona Date: Thu, 30 Oct 2025 10:46:59 +0100 Subject: [PATCH 01/15] debug --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 9a22b7f27bc2..89519d5b7979 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -131,7 +131,10 @@ describe('Vault Corruption', function () { // reload and check title as quickly a possible { interval: 100, timeout: 10000 }, ); - await driver.assertElementNotPresent('.loading-logo', { timeout: 10000 }); + await driver.assertElementNotPresent('.loading-logo', { + timeout: 10000, + waitAtLeastGuard: 1000, + }); } /** From c39599cc8e053b9fbbfe17206283a996f9b8d0e0 Mon Sep 17 00:00:00 2001 From: seaona Date: Thu, 30 Oct 2025 11:12:33 +0100 Subject: [PATCH 02/15] delays --- .../tests/vault-corruption/vault-corruption.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 89519d5b7979..bff2793d8a80 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -168,6 +168,7 @@ describe('Vault Corruption', function () { // use the home page to destroy the vault await driver.executeAsyncScript(script); + await driver.delay(2000); // the previous tab we were using is now closed, so we need to tell Selenium // to switch back to the other page (required for Chrome) @@ -176,9 +177,13 @@ describe('Vault Corruption', function () { // get a new tab ready to use (required for Firefox) await driver.openNewPage('about:blank'); + await driver.delay(2000); + // wait for the background page to reload await waitForVaultRestorePage(driver); + await driver.delay(2000); + return firstAddress; } @@ -197,13 +202,18 @@ describe('Vault Corruption', function () { confirm: boolean; }) { // click the Recovery/Reset button + await driver.delay(2000); + await driver.clickElement('#critical-error-button'); // Confirm we want to recover/reset. const prompt = await driver.driver.switchTo().alert(); if (confirm) { + await driver.delay(2000); + await prompt.accept(); } else { + await driver.delay(2000); await prompt.dismiss(); } From 757b45b0694fd2263f05084c1538f0b7b99e195a Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 09:49:34 +0100 Subject: [PATCH 03/15] delay --- .../tests/vault-corruption/vault-corruption.spec.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index bff2793d8a80..dc66a379b870 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -120,6 +120,7 @@ describe('Vault Corruption', function () { * @param driver - The WebDriver instance. */ async function waitForVaultRestorePage(driver: Driver) { + await driver.delay(10000); await driver.waitUntil( async () => { await driver.navigate(PAGES.HOME, { waitForControllers: false }); @@ -168,7 +169,6 @@ describe('Vault Corruption', function () { // use the home page to destroy the vault await driver.executeAsyncScript(script); - await driver.delay(2000); // the previous tab we were using is now closed, so we need to tell Selenium // to switch back to the other page (required for Chrome) @@ -177,13 +177,9 @@ describe('Vault Corruption', function () { // get a new tab ready to use (required for Firefox) await driver.openNewPage('about:blank'); - await driver.delay(2000); - // wait for the background page to reload await waitForVaultRestorePage(driver); - await driver.delay(2000); - return firstAddress; } @@ -202,24 +198,18 @@ describe('Vault Corruption', function () { confirm: boolean; }) { // click the Recovery/Reset button - await driver.delay(2000); - await driver.clickElement('#critical-error-button'); // Confirm we want to recover/reset. const prompt = await driver.driver.switchTo().alert(); if (confirm) { - await driver.delay(2000); - await prompt.accept(); } else { - await driver.delay(2000); await prompt.dismiss(); } if (confirm) { // delay needed to mitigate a race condition where the tab is closed and re-opened after confirming, causing to window to become stale - await driver.delay(3000); try { await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, From 0c18ebe03665a53cd92534cff7072fbb626bb7dd Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 09:50:16 +0100 Subject: [PATCH 04/15] revrt --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index dc66a379b870..fd178cdf0333 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -132,10 +132,7 @@ describe('Vault Corruption', function () { // reload and check title as quickly a possible { interval: 100, timeout: 10000 }, ); - await driver.assertElementNotPresent('.loading-logo', { - timeout: 10000, - waitAtLeastGuard: 1000, - }); + await driver.assertElementNotPresent('.loading-logo', { timeout: 10000 }); } /** From 28a20368f0b761d214890527a98d8cb3a3121407 Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 09:50:46 +0100 Subject: [PATCH 05/15] revrt --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index fd178cdf0333..5b7b19f39425 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -207,6 +207,7 @@ describe('Vault Corruption', function () { if (confirm) { // delay needed to mitigate a race condition where the tab is closed and re-opened after confirming, causing to window to become stale + await driver.delay(3000); try { await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, From 2c2222e4ba2cc53d0f5c72ccd0f37a749ab43ae4 Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 10:26:41 +0100 Subject: [PATCH 06/15] tming --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 5b7b19f39425..1648ae9c2c44 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -120,7 +120,6 @@ describe('Vault Corruption', function () { * @param driver - The WebDriver instance. */ async function waitForVaultRestorePage(driver: Driver) { - await driver.delay(10000); await driver.waitUntil( async () => { await driver.navigate(PAGES.HOME, { waitForControllers: false }); @@ -207,7 +206,7 @@ describe('Vault Corruption', function () { if (confirm) { // delay needed to mitigate a race condition where the tab is closed and re-opened after confirming, causing to window to become stale - await driver.delay(3000); + await driver.delay(8000); try { await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, From e54c0bcb91a3d820ba768319f289943488c692c7 Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 10:50:57 +0100 Subject: [PATCH 07/15] delay --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 1648ae9c2c44..4a794a1d7b27 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -165,6 +165,7 @@ describe('Vault Corruption', function () { // use the home page to destroy the vault await driver.executeAsyncScript(script); + await driver.delay(5000); // the previous tab we were using is now closed, so we need to tell Selenium // to switch back to the other page (required for Chrome) From 86cea104d9f115add0e762e949f41b623bd50b5d Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 11:21:53 +0100 Subject: [PATCH 08/15] ? --- ui/helpers/utils/critical-startup-error-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index 14b5f870699e..049fc18c2aba 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -125,7 +125,7 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - displayStateCorruptionError( + await displayStateCorruptionError( this.#container, this.#port, error, From b9566c2331ef6a8b747309976b57ec59eb11f8ce Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 11:24:27 +0100 Subject: [PATCH 09/15] rvrt --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 4a794a1d7b27..b7098c76eedb 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -207,7 +207,7 @@ describe('Vault Corruption', function () { if (confirm) { // delay needed to mitigate a race condition where the tab is closed and re-opened after confirming, causing to window to become stale - await driver.delay(8000); + await driver.delay(3000); try { await driver.switchToWindowWithTitle( WINDOW_TITLES.ExtensionInFullScreenView, From 880f265682969d2cc694e6feb354e871fd1e3657 Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 11:35:48 +0100 Subject: [PATCH 10/15] change --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 4 +--- ui/helpers/utils/critical-startup-error-handler.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index b7098c76eedb..4ea16e70e537 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -122,6 +122,7 @@ describe('Vault Corruption', function () { async function waitForVaultRestorePage(driver: Driver) { await driver.waitUntil( async () => { + await driver.openNewPage('about:blank'); 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 @@ -171,9 +172,6 @@ describe('Vault Corruption', function () { // to switch back to the other page (required for Chrome) await driver.switchToWindow(initialWindow); - // get a new tab ready to use (required for Firefox) - await driver.openNewPage('about:blank'); - // wait for the background page to reload await waitForVaultRestorePage(driver); diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index 049fc18c2aba..14b5f870699e 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -125,7 +125,7 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - await displayStateCorruptionError( + displayStateCorruptionError( this.#container, this.#port, error, From d6f20692dbfe4fb3f674e9280e4bf0bb127aa8cb Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 11:36:28 +0100 Subject: [PATCH 11/15] rmv delay --- test/e2e/tests/vault-corruption/vault-corruption.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 4ea16e70e537..18ab3ab1bcad 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -166,7 +166,6 @@ describe('Vault Corruption', function () { // use the home page to destroy the vault await driver.executeAsyncScript(script); - await driver.delay(5000); // the previous tab we were using is now closed, so we need to tell Selenium // to switch back to the other page (required for Chrome) From 9afd08ff87ca5316fb6f3113778d7e4546afacdd Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 12:04:34 +0100 Subject: [PATCH 12/15] test --- .../tests/vault-corruption/vault-corruption.spec.ts | 4 +++- ui/helpers/utils/critical-startup-error-handler.ts | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 18ab3ab1bcad..9a22b7f27bc2 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -122,7 +122,6 @@ describe('Vault Corruption', function () { async function waitForVaultRestorePage(driver: Driver) { await driver.waitUntil( async () => { - await driver.openNewPage('about:blank'); 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 @@ -171,6 +170,9 @@ describe('Vault Corruption', function () { // to switch back to the other page (required for Chrome) await driver.switchToWindow(initialWindow); + // get a new tab ready to use (required for Firefox) + await driver.openNewPage('about:blank'); + // wait for the background page to reload await waitForVaultRestorePage(driver); diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index 14b5f870699e..2150a7c0364c 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -125,7 +125,12 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - displayStateCorruptionError( + // Cancel the liveness check since we're displaying a corruption error + clearTimeout(this.#livenessCheckTimeoutId); + if (this.#onLivenessCheckCompleted) { + this.#onLivenessCheckCompleted(); + } + await displayStateCorruptionError( this.#container, this.#port, error, @@ -145,6 +150,11 @@ export class CriticalStartupErrorHandler { error: ErrorLike; currentLocale?: string; }; + // Cancel the liveness check since we're displaying a general error + clearTimeout(this.#livenessCheckTimeoutId); + if (this.#onLivenessCheckCompleted) { + this.#onLivenessCheckCompleted(); + } await displayCriticalError( this.#container, CriticalErrorTranslationKey.TroubleStarting, From f6dfa7acc0a3a01d916494d199fa5f1015b27fbe Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 12:29:54 +0100 Subject: [PATCH 13/15] try --- .../utils/critical-startup-error-handler.ts | 74 +++++++++++-------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index 2150a7c0364c..f011a7e42306 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -34,6 +34,8 @@ export class CriticalStartupErrorHandler { #onLivenessCheckCompleted?: () => void; + #errorDisplayed = false; + /** * Creates an instance of CriticalStartupErrorHandler. * This class listens for critical startup errors from the background script @@ -66,13 +68,17 @@ export class CriticalStartupErrorHandler { try { await Promise.race([livenessCheck, timeoutPromise]); } catch (error) { - await displayCriticalError( - this.#container, - CriticalErrorTranslationKey.TroubleStarting, - // This cast is safe because `livenessCheck` can't throw, and `timeoutPromise` only throws an - // error. - error as ErrorLike, - ); + // Only display error if we haven't already displayed one + if (!this.#errorDisplayed) { + this.#errorDisplayed = true; + await displayCriticalError( + this.#container, + CriticalErrorTranslationKey.TroubleStarting, + // This cast is safe because `livenessCheck` can't throw, and `timeoutPromise` only throws an + // error. + error as ErrorLike, + ); + } } finally { clearTimeout(this.#livenessCheckTimeoutId); } @@ -101,7 +107,9 @@ export class CriticalStartupErrorHandler { if (method === BACKGROUND_LIVENESS_METHOD) { if (this.#onLivenessCheckCompleted) { this.#onLivenessCheckCompleted(); - } else { + } else if (!this.#errorDisplayed) { + // Only display error if we haven't already displayed one and liveness check wasn't initialized + this.#errorDisplayed = true; await displayCriticalError( this.#container, CriticalErrorTranslationKey.TroubleStarting, @@ -125,18 +133,22 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - // Cancel the liveness check since we're displaying a corruption error - clearTimeout(this.#livenessCheckTimeoutId); - if (this.#onLivenessCheckCompleted) { - this.#onLivenessCheckCompleted(); + // Only display error if we haven't already displayed one + if (!this.#errorDisplayed) { + this.#errorDisplayed = true; + // Cancel the liveness check since we're displaying a corruption error + clearTimeout(this.#livenessCheckTimeoutId); + if (this.#onLivenessCheckCompleted) { + this.#onLivenessCheckCompleted(); + } + await displayStateCorruptionError( + this.#container, + this.#port, + error, + hasBackup, + currentLocale, + ); } - await displayStateCorruptionError( - this.#container, - this.#port, - error, - hasBackup, - currentLocale, - ); } else if (method === DISPLAY_GENERAL_STARTUP_ERROR) { if (!hasProperty(data, 'params') || !isObject(data.params)) { log.error( @@ -150,17 +162,21 @@ export class CriticalStartupErrorHandler { error: ErrorLike; currentLocale?: string; }; - // Cancel the liveness check since we're displaying a general error - clearTimeout(this.#livenessCheckTimeoutId); - if (this.#onLivenessCheckCompleted) { - this.#onLivenessCheckCompleted(); + // Only display error if we haven't already displayed one + if (!this.#errorDisplayed) { + this.#errorDisplayed = true; + // Cancel the liveness check since we're displaying a general error + clearTimeout(this.#livenessCheckTimeoutId); + if (this.#onLivenessCheckCompleted) { + this.#onLivenessCheckCompleted(); + } + await displayCriticalError( + this.#container, + CriticalErrorTranslationKey.TroubleStarting, + error as ErrorLike, + currentLocale, + ); } - await displayCriticalError( - this.#container, - CriticalErrorTranslationKey.TroubleStarting, - error as ErrorLike, - currentLocale, - ); } }; From 132dd83562bf0afd211fb1a2d7885e19063acb65 Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 14:05:08 +0100 Subject: [PATCH 14/15] try --- .../vault-corruption/vault-corruption.spec.ts | 13 +--- .../utils/critical-startup-error-handler.ts | 68 ++++++------------- 2 files changed, 23 insertions(+), 58 deletions(-) diff --git a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts index 9a22b7f27bc2..b7a1f45eb655 100644 --- a/test/e2e/tests/vault-corruption/vault-corruption.spec.ts +++ b/test/e2e/tests/vault-corruption/vault-corruption.spec.ts @@ -120,17 +120,8 @@ describe('Vault Corruption', function () { * @param driver - The WebDriver instance. */ async function waitForVaultRestorePage(driver: Driver) { - 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; - }, - // reload and check title as quickly a possible - { interval: 100, timeout: 10000 }, - ); + await driver.delay(10000) + await driver.navigate(PAGES.HOME, { waitForControllers: false }); await driver.assertElementNotPresent('.loading-logo', { timeout: 10000 }); } diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index f011a7e42306..049fc18c2aba 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -34,8 +34,6 @@ export class CriticalStartupErrorHandler { #onLivenessCheckCompleted?: () => void; - #errorDisplayed = false; - /** * Creates an instance of CriticalStartupErrorHandler. * This class listens for critical startup errors from the background script @@ -68,17 +66,13 @@ export class CriticalStartupErrorHandler { try { await Promise.race([livenessCheck, timeoutPromise]); } catch (error) { - // Only display error if we haven't already displayed one - if (!this.#errorDisplayed) { - this.#errorDisplayed = true; - await displayCriticalError( - this.#container, - CriticalErrorTranslationKey.TroubleStarting, - // This cast is safe because `livenessCheck` can't throw, and `timeoutPromise` only throws an - // error. - error as ErrorLike, - ); - } + await displayCriticalError( + this.#container, + CriticalErrorTranslationKey.TroubleStarting, + // This cast is safe because `livenessCheck` can't throw, and `timeoutPromise` only throws an + // error. + error as ErrorLike, + ); } finally { clearTimeout(this.#livenessCheckTimeoutId); } @@ -107,9 +101,7 @@ export class CriticalStartupErrorHandler { if (method === BACKGROUND_LIVENESS_METHOD) { if (this.#onLivenessCheckCompleted) { this.#onLivenessCheckCompleted(); - } else if (!this.#errorDisplayed) { - // Only display error if we haven't already displayed one and liveness check wasn't initialized - this.#errorDisplayed = true; + } else { await displayCriticalError( this.#container, CriticalErrorTranslationKey.TroubleStarting, @@ -133,22 +125,13 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - // Only display error if we haven't already displayed one - if (!this.#errorDisplayed) { - this.#errorDisplayed = true; - // Cancel the liveness check since we're displaying a corruption error - clearTimeout(this.#livenessCheckTimeoutId); - if (this.#onLivenessCheckCompleted) { - this.#onLivenessCheckCompleted(); - } - await displayStateCorruptionError( - this.#container, - this.#port, - error, - hasBackup, - currentLocale, - ); - } + await displayStateCorruptionError( + this.#container, + this.#port, + error, + hasBackup, + currentLocale, + ); } else if (method === DISPLAY_GENERAL_STARTUP_ERROR) { if (!hasProperty(data, 'params') || !isObject(data.params)) { log.error( @@ -162,21 +145,12 @@ export class CriticalStartupErrorHandler { error: ErrorLike; currentLocale?: string; }; - // Only display error if we haven't already displayed one - if (!this.#errorDisplayed) { - this.#errorDisplayed = true; - // Cancel the liveness check since we're displaying a general error - clearTimeout(this.#livenessCheckTimeoutId); - if (this.#onLivenessCheckCompleted) { - this.#onLivenessCheckCompleted(); - } - await displayCriticalError( - this.#container, - CriticalErrorTranslationKey.TroubleStarting, - error as ErrorLike, - currentLocale, - ); - } + await displayCriticalError( + this.#container, + CriticalErrorTranslationKey.TroubleStarting, + error as ErrorLike, + currentLocale, + ); } }; From ef934d2787e749cdb47f03695cde195adfc1802e Mon Sep 17 00:00:00 2001 From: seaona Date: Fri, 31 Oct 2025 14:09:15 +0100 Subject: [PATCH 15/15] revert --- ui/helpers/utils/critical-startup-error-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/helpers/utils/critical-startup-error-handler.ts b/ui/helpers/utils/critical-startup-error-handler.ts index 049fc18c2aba..14b5f870699e 100644 --- a/ui/helpers/utils/critical-startup-error-handler.ts +++ b/ui/helpers/utils/critical-startup-error-handler.ts @@ -125,7 +125,7 @@ export class CriticalStartupErrorHandler { hasBackup: boolean; currentLocale?: string; }; - await displayStateCorruptionError( + displayStateCorruptionError( this.#container, this.#port, error,