Skip to content

e2e: fail faster when browser launch error - #4103

Merged
pmachapman merged 1 commit into
masterfrom
task/e2e-browser-fail-timeout
Sep 14, 2026
Merged

pmachapman merged 1 commit into
masterfrom
task/e2e-browser-fail-timeout

Conversation

@marksvc

@marksvc marksvc commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Previously, if launching the browser failed, it would timeout after 3 minutes and give less explanation.
This patch times out faster in this situation, and starts the error explanation with something like

Error: Unable to start chromium.


Open in Devin Review


This change is Reviewable

@marksvc
marksvc marked this pull request as draft September 14, 2026 20:50
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.95%. Comparing base (568151e) to head (f21e70c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4103   +/-   ##
=======================================
  Coverage   80.95%   80.95%           
=======================================
  Files         664      664           
  Lines       42153    42153           
  Branches     6944     6944           
=======================================
  Hits        34126    34126           
  Misses       6864     6864           
  Partials     1163     1163           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@marksvc
marksvc deployed to screenshot_diff September 14, 2026 20:57 — with GitHub Actions Active
@marksvc

marksvc commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

src/SIL.XForge.Scripture/ClientApp/e2e/e2e-utils.ts line 19 at r1 (raw file):

  } catch (cause) {
    // A browser that cannot start is a problem with the environment rather than with a test.
    throw new Error(`Unable to start ${engine.name()}.`, { cause: cause });

Devin is concerned that "Side-browser launch failures still retry". When a workflow (such as community-checking.ts:155) launches a browser, it can fail for the same reason as it can fail when launching the browser at a higher level (such as using a particular version of deno). I decided to just treat browser launch errors within a workflow as normal errors that happen during testing, rather than handle them specially as is done at a higher level.

Starting the tests shows that launching the browser can or did work. I'm not concerned that the browser will suddenly fail to start launching for a new reason.

@marksvc

marksvc commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator Author

src/SIL.XForge.Scripture/ClientApp/e2e/e2e-utils.ts line 16 at r1 (raw file):

export async function launchBrowser(engine: BrowserType, options: LaunchOptions): Promise<Browser> {
  try {
    return await engine.launch({ timeout: BROWSER_LAUNCH_TIMEOUT_MS, ...options });

Devin is concerned that "Caller timeout bypasses launch limit". It is my intention that timeout be over-ridable by callers.

@marksvc marksvc added the e2e Run e2e tests for this pull request label Sep 14, 2026
@marksvc
marksvc marked this pull request as ready for review September 14, 2026 22:08
@pmachapman pmachapman self-assigned this Sep 14, 2026
@pmachapman
pmachapman self-requested a review September 14, 2026 22:29

@pmachapman pmachapman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:lgtm:

@pmachapman reviewed 4 files and all commit messages, made 1 comment, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on marksvc).

@pmachapman
pmachapman merged commit 8df9c6b into master Sep 14, 2026
41 checks passed
@pmachapman
pmachapman deleted the task/e2e-browser-fail-timeout branch September 14, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run e2e tests for this pull request testing not required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants