From 7a613111478cb677f4ec2f57d4f9a33885ffaa15 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Tue, 1 Sep 2026 17:29:41 +0200 Subject: [PATCH 1/6] chore(web): tweak error message Previously the browser component and web engine had the same error message which made it harder to know where the exception happened if a call stack or source map were missing. This change modifies the message in engine. Related-to: $#16190 Build-bot: skip release:android,ios,web Test-bot: skip --- web/src/app/browser/src/contextManager.ts | 2 +- web/src/engine/src/main/contextManagerBase.ts | 2 +- web/src/test/manual/web/keyboard-errors/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index 9598227110..51fafc480c 100644 --- a/web/src/app/browser/src/contextManager.ts +++ b/web/src/app/browser/src/contextManager.ts @@ -532,7 +532,7 @@ export class ContextManager extends ContextManagerBase { this.engineConfig.alertHost?.wait(); // clear the wait message box, either way. const message = (err as Error)?.message || - 'Sorry, the ' + keyboardId + ' keyboard for ' + languageCode + ' is not currently available.'; + `Sorry, the '${keyboardId}' keyboard for '${languageCode}' is not currently available.`; if(err instanceof KeyboardScriptError) { // We get signaled about error log messages if the site is connected to our Sentry error reporting diff --git a/web/src/engine/src/main/contextManagerBase.ts b/web/src/engine/src/main/contextManagerBase.ts index e9ddd9a18a..7ffe9056ba 100644 --- a/web/src/engine/src/main/contextManagerBase.ts +++ b/web/src/engine/src/main/contextManagerBase.ts @@ -368,7 +368,7 @@ export abstract class ContextManagerBase const keyboardPromise = this.keyboardCache.fetchKeyboard(requestedStub.KI); const timeoutPromise = new Promise((resolve, reject) => { - const timeoutMsg = `Sorry, the ${requestedStub.name} keyboard for ${requestedStub.langName} is not currently available.`; + const timeoutMsg = `The download of the '${requestedStub.name}' keyboard for '${requestedStub.langName}' timed out.`; window.setTimeout(() => reject(new Error(timeoutMsg)), ContextManagerBase.TIMEOUT_THRESHOLD); }); diff --git a/web/src/test/manual/web/keyboard-errors/index.html b/web/src/test/manual/web/keyboard-errors/index.html index e00e2f714c..46b3966328 100644 --- a/web/src/test/manual/web/keyboard-errors/index.html +++ b/web/src/test/manual/web/keyboard-errors/index.html @@ -64,7 +64,7 @@
  • wrong-filename keyboard: "Unable to download wrong-filename keyboard for debugging"
  • non-parsable keyboard: "Error registering the non-parsable keyboard for debugging; keyboard script at ./unparsable.js may contain an error."
  • -
  • timeout keyboard: "Sorry, the timeout keyboard for debugging is not currently available."
  • +
  • timeout keyboard: "The download of the 'timeout' keyboard for 'debugging' timed out."

Return to testing home page

From a1d50b35bb9321360de2b2448e25388b25de7c07 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 2 Sep 2026 15:04:40 +0200 Subject: [PATCH 2/6] Apply batched suggestions from code review Co-authored-by: Marc Durdin --- web/src/app/browser/src/contextManager.ts | 5 +++-- web/src/engine/src/main/contextManagerBase.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index 51fafc480c..a164d63fa7 100644 --- a/web/src/app/browser/src/contextManager.ts +++ b/web/src/app/browser/src/contextManager.ts @@ -531,8 +531,9 @@ export class ContextManager extends ContextManagerBase { this.engineConfig.alertHost?.wait(); // clear the wait message box, either way. - const message = (err as Error)?.message || - `Sorry, the '${keyboardId}' keyboard for '${languageCode}' is not currently available.`; + + const message = + `Activation of '${keyboardId}' keyboard failed: ${(err as Error)?.message ?? err?.toString() ?? 'unknown error'}`; if(err instanceof KeyboardScriptError) { // We get signaled about error log messages if the site is connected to our Sentry error reporting diff --git a/web/src/engine/src/main/contextManagerBase.ts b/web/src/engine/src/main/contextManagerBase.ts index 7ffe9056ba..8554c124bc 100644 --- a/web/src/engine/src/main/contextManagerBase.ts +++ b/web/src/engine/src/main/contextManagerBase.ts @@ -368,7 +368,7 @@ export abstract class ContextManagerBase const keyboardPromise = this.keyboardCache.fetchKeyboard(requestedStub.KI); const timeoutPromise = new Promise((resolve, reject) => { - const timeoutMsg = `The download of the '${requestedStub.name}' keyboard for '${requestedStub.langName}' timed out.`; + const timeoutMsg = `Download of ${requestedStub.KI} for language ${requestedStub.langId} timed out.`; window.setTimeout(() => reject(new Error(timeoutMsg)), ContextManagerBase.TIMEOUT_THRESHOLD); }); From 67c7bfe9532b364a74d4ea110a57f4c4c1e8a32c Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 2 Sep 2026 15:23:30 +0200 Subject: [PATCH 3/6] chore(web): adjust expected error message in manual test --- web/src/app/browser/src/contextManager.ts | 5 ++--- web/src/test/manual/web/keyboard-errors/index.html | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/web/src/app/browser/src/contextManager.ts b/web/src/app/browser/src/contextManager.ts index a164d63fa7..2b58a598cb 100644 --- a/web/src/app/browser/src/contextManager.ts +++ b/web/src/app/browser/src/contextManager.ts @@ -531,9 +531,8 @@ export class ContextManager extends ContextManagerBase { this.engineConfig.alertHost?.wait(); // clear the wait message box, either way. - - const message = - `Activation of '${keyboardId}' keyboard failed: ${(err as Error)?.message ?? err?.toString() ?? 'unknown error'}`; + + const message = `Activation of '${keyboardId}' failed: ${(err as Error)?.message ?? err?.toString() ?? 'unknown error'}`; if(err instanceof KeyboardScriptError) { // We get signaled about error log messages if the site is connected to our Sentry error reporting diff --git a/web/src/test/manual/web/keyboard-errors/index.html b/web/src/test/manual/web/keyboard-errors/index.html index 46b3966328..325058fb7a 100644 --- a/web/src/test/manual/web/keyboard-errors/index.html +++ b/web/src/test/manual/web/keyboard-errors/index.html @@ -64,7 +64,7 @@
  • wrong-filename keyboard: "Unable to download wrong-filename keyboard for debugging"
  • non-parsable keyboard: "Error registering the non-parsable keyboard for debugging; keyboard script at ./unparsable.js may contain an error."
  • -
  • timeout keyboard: "The download of the 'timeout' keyboard for 'debugging' timed out."
  • +
  • timeout keyboard: "Activation of 'Keyboard_timeout' failed: Download of Keyboard_timeout for language lo timed out."

Return to testing home page

From a570108f8565b0110d726f1f40ffd5b6daf6f6d5 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Wed, 2 Sep 2026 19:34:00 +0200 Subject: [PATCH 4/6] chore(web): allow to run keyboard-errors test from build server --- web/src/test/manual/web/keyboard-errors/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/test/manual/web/keyboard-errors/index.html b/web/src/test/manual/web/keyboard-errors/index.html index 325058fb7a..45ed905739 100644 --- a/web/src/test/manual/web/keyboard-errors/index.html +++ b/web/src/test/manual/web/keyboard-errors/index.html @@ -71,7 +71,7 @@