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
- Locate
CookiesCorrectlyLoadWithMultipleWebViews in the UI test project (likely src/Controls/tests/TestCases.Shared.Tests/ or an Issues.UITests subfolder).
- 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.
- 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.
- 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.
- 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 · ◷
Summary
CookiesCorrectlyLoadWithMultipleWebViewsfails consistently inmaui-pr-uitestsacross 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 aStaleElementReferenceExceptionduring the test teardown close sequence.Build Information
Affected Legs
Microsoft.Maui.Controls.Issues.UITestsMicrosoft.Maui.Controls.Issues.UITestsWebView2orWebViewcontrols tests categoryError Message
Recommended Action
CookiesCorrectlyLoadWithMultipleWebViewsin the UI test project (likelysrc/Controls/tests/TestCases.Shared.Tests/or anIssues.UITestssubfolder).WebViewinstances with cookies — check whether the test navigates between pages and the app crashes when a second WebView is loaded simultaneously.ClosePagestale 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.WebViewcookie loading produces a memory or threading issue on iOS/MacCatalyst.WebView.ios.cs,WKWebViewcookie handlers, or multiple-WebView scenarios.