Skip to content

[ci-scan] Recurring: CookiesCorrectlyLoadWithMultipleWebViews fails on iOS/MacCatalyst in maui-pr-uitests #36117

Description

@github-actions

Summary

CookiesCorrectlyLoadWithMultipleWebViews fails consistently in maui-pr-uitests across at least 2 of the last 10 builds on iOS and MacCatalyst. The failure manifests as either an app crash ("The app was expected to be running still, investigate as possible crash") or a StaleElementReferenceException during the test teardown close sequence.

Build Information

  • Pipeline: maui-pr-uitests (definition 313)
  • Build: 1478901
  • Build ID: 1478901
  • Branch: main
  • First seen: 2026-06-23 (build 1476735)
  • Occurrences: 2 in last 10 builds (builds 1478901 on 2026-06-24, 1476735 on 2026-06-23)

Affected Legs

  • iOS UI tests — Microsoft.Maui.Controls.Issues.UITests
  • MacCatalyst UI tests — Microsoft.Maui.Controls.Issues.UITests
  • Test file/class: WebView2 or WebView controls tests category

Error Message

Failed CookiesCorrectlyLoadWithMultipleWebViews [56 s]

# Variant A (app crash):
The app was expected to be running still, investigate as possible crash

# Variant B (stale element on close):
WebDriverException: OpenQA.Selenium.StaleElementReferenceException:
The element ""ClosePage" Button" identified by "..." is not present
on the current view (Failed to resolve remote element AX element pid: N,
token: ...). Make sure the current view is the expected one.

Recommended Action

  1. Locate CookiesCorrectlyLoadWithMultipleWebViews in the UI test project (likely src/Controls/tests/TestCases.Shared.Tests/ or an Issues.UITests subfolder).
  2. The test involves multiple WebView instances with cookies — check whether the test navigates between pages and the app crashes when a second WebView is loaded simultaneously.
  3. Investigate the ClosePage stale element: the test may be trying to close a page that has already been removed from the native view hierarchy, suggesting a race condition in the test teardown.
  4. Consider adding an explicit wait or retry around the close navigation step, and check if the WebView cookie loading produces a memory or threading issue on iOS/MacCatalyst.
  5. Cross-reference with any recent changes to WebView.ios.cs, WKWebView cookie handlers, or multiple-WebView scenarios.

Generated by CI Failure Scanner · 3.5K AIC · ⌖ 15 AIC · ⊞ 36.4K ·

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions