Skip to content

Add 'session not created' to Chrome driver retry error snippets#1575

Merged
ilonatommy merged 1 commit intomainfrom
fix/chrome-session-not-created-retry
Mar 23, 2026
Merged

Add 'session not created' to Chrome driver retry error snippets#1575
ilonatommy merged 1 commit intomainfrom
fix/chrome-session-not-created-retry

Conversation

@ilonatommy
Copy link
Copy Markdown
Member

@ilonatommy ilonatommy commented Mar 23, 2026

Problem

The retry logic in GetChromiumDriver catches transient Chrome startup failures and retries up to 3 times, matching error messages against a list of known snippets:

  • exited abnormally
  • Cannot start the driver service
  • failed to start
  • DevToolsActivePort file doesn't exist

However, Chrome can also crash during session creation with error messages like:

session not created: Chrome instance exited. Examine ChromeDriver verbose log to determine the cause. (SessionNotCreated)

This error doesn't match any of the existing snippets, so the retry logic never fires and the test fails immediately.

Context

Observed in dotnet/runtime#125566 (Chrome version bump to 146.0.7680.80), where 2 of 202 Helix work items failed with this error but also on the next bump PR and other runtime PRs. The existing snippets have been added reactively over the years as new Chrome crash messages appeared (see #513, #656, #1563).

Fix

Add session not created as a broader error snippet. This covers:

  • session not created: Chrome instance exited. (the immediate trigger)
  • session not created: Chrome failed to start: crashed. (already partially covered by failed to start)
  • Future session not created: ... variants

This is intentionally broader than adding just Chrome instance exited to avoid the pattern of chasing individual error messages.

The retry logic in GetChromiumDriver catches transient Chrome startup
failures and retries up to 3 times. However, the error snippet list
missed the broad 'session not created' pattern, which covers several
Chrome crash variants including:

  session not created: Chrome instance exited.
  session not created: Chrome failed to start: crashed.

The existing snippets ('exited abnormally', 'failed to start', etc.)
have been added reactively over time as new error messages surfaced.
Adding 'session not created' as a broader pattern covers current and
future variants of this class of transient Chrome startup failure.

Observed in dotnet/runtime#125566 (Chrome 146 bump) where 2 of 202
Helix work items failed with 'session not created: Chrome instance
exited' — the retry never fired because no snippet matched.

Co-authored-by: Copilot <[email protected]>
@ilonatommy ilonatommy self-assigned this Mar 23, 2026
@ilonatommy ilonatommy added the wasm WASM area label Mar 23, 2026
@ilonatommy ilonatommy requested a review from pavelsavara March 23, 2026 10:49
@ilonatommy ilonatommy enabled auto-merge (squash) March 23, 2026 10:50
@ilonatommy ilonatommy requested review from maraf and radekdoulik March 23, 2026 12:20
@ilonatommy ilonatommy merged commit e5857fb into main Mar 23, 2026
17 checks passed
@ilonatommy ilonatommy deleted the fix/chrome-session-not-created-retry branch March 23, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasm WASM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants