Skip to content

[Testing] Failing tests on iOS 14.5 - webView:decidePolicyForNavigationAction:decisionHandler:] was not called #18749

@rmarinho

Description

@rmarinho

The iOS tests on 14.5 sometimes fail with

dbug: 2023-11-15 04:25:40.196985-0500 Microsoft.Maui.Core.DeviceTests[60083:323748]     Exception: ObjCRuntime.ObjCException: Objective-C exception thrown.  Name: NSInternalInconsistencyException Reason: Completion handler passed to -[Microsoft_Maui_Platform_MauiWebViewNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:] was not called
dbug: Native stack trace:
dbug: 0   CoreFoundation                      0x00007fff20422fba __exceptionPreprocess + 242
dbug: 1   libobjc.A.dylib                     0x00007fff20193ff5 objc_exception_throw + 48
dbug: 2023-11-15 04:25:40.197146-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	2   CoreFoundation                      0x00007fff20422e98 -[NSException initWithCoder:] + 0
dbug: 3   WebKit                              0x00007fff2863b7be _ZN6WebKit28CompletionHandlerCallCheckerD2Ev + 124
dbug: 2023-11-15 04:25:40.197267-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	4   WebKit                              0x00007fff2874b475 _ZN3WTF3RefIN6WebKit28CompletionHandlerCallCheckerENS_12RawPtrTraitsIS2_EEED2Ev + 41
dbug: 2023-11-15 04:25:40.197390-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	5   WebKit                              0x00007fff287e2544 _ZZN3WTF8BlockPtrIFv24WKNavigationActionPolicyEE12fromCallableIZN6WebKit15NavigationState16NavigationClient31decidePolicyForNavigationActionERNS5_12WebPageProxyEONS_3RefIN3API16NavigationActionENS_12RawPtrTraitsISC_EEEEONSA_INS5_27WebFramePolicyListenerProxyENSD_ISH_EEEEPNSB_6ObjectEE4$_10EES3_T_ENUlPKvE_8__invokeESQ_ + 62
dbug: 2023-11-15 04:25:40.197537-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	6   libsystem_blocks.dylib              0x00007fff20080432 _Block_release + 128
dbug: 7   libdispatch.dylib                   0x00007fff201078df _dispatch_client_callout + 8
dbug: 8   libdispatch.dylib                   0x00007fff20114a27 _dispatch_main_queue_callback_4CF + 1045
dbug: 2023-11-15 04:25:40.197658-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	9   CoreFoundation                      0x00007fff203908f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
dbug: 10  CoreFoundation                      0x00007fff2038b169 __CFRunLoopRun + 2781
dbug: 11  CoreFoundation                      0x00007fff2038a1a7 CFRunLoopRunSpecific + 567
dbug: 2023-11-15 04:25:40.197795-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	12  GraphicsServices                    0x00007fff2b874d85 GSEventRunModal + 139
dbug: 13  UIKitCore                           0x00007fff246c14df -[UIApplication _run] + 912
dbug: 14  UIKitCore                           0x00007fff246c639c UIApplicationMain + 101
dbug: 2023-11-15 04:25:40.197922-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	15  libxamarin-dotnet-debug.dylib       0x00000001083d14da xamarin_UIApplicationMain + 58
dbug: 16  libmonosgen-2.0.dylib               0x0000000107e7ae45 do_icall + 341
dbug: 17  libmonosgen-2.0.dylib               0x0000000107e795d7 do_icall_wrapper + 295
dbug: 2023-11-15 04:25:40.198058-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	18  libmonosgen-2.0.dylib               0x0000000107e6a2f6 mono_interp_exec_method + 3990
dbug: 19  libmonosgen-2.0.dylib               0x0000000107e67a63 interp_runtime_invoke + 259
dbug: 20  libmonosgen-2.0.dylib               0x0000000107f4db68 mono_runtime_invoke_checked + 136
dbug: 2023-11-15 04:25:40.198188-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	21  libmonosgen-2.0.dylib               0x0000000107f5533b mono_runtime_exec_main_checked + 107
dbug: 22  libmonosgen-2.0.dylib               0x0000000107dba1d2 mono_jit_exec + 354
dbug: 23  libxamarin-dotnet-debug.dylib       0x0000000108415bba xamarin_main + 1898
dbug: 2023-11-15 04:25:40.198324-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	24  Microsoft.Maui.Core.DeviceTests     0x00000001071f7b84 main + 68
dbug: 25  ???                                 0x000000010cfb141f 0x0 + 4512748575
dbug: 2023-11-15 04:25:40.198455-0500 Microsoft.Maui.Core.DeviceTests[60083:323748]    at ObjCRuntime.Runtime.ThrowNSException(IntPtr ns_exception) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 507
dbug: at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 58
dbug: 2023-11-15 04:25:40.198573-0500 Microsoft.Maui.Core.DeviceTests[60083:323748]    at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
dbug: 2023-11-15 04:25:40.198710-0500 Microsoft.Maui.Core.DeviceTests[60083:323748]    at Microsoft.Maui.DeviceTests.Program.Main(String[] args) in /Users/builder/azdo/_work/1/s/src/Core/tests/DeviceTests/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen/Microsoft.Maui.TestUtils.DeviceTests.Runners.SourceGen.CodeBehindGenerator/TestRunner.iOS.sg.cs:line 12
dbug: Native stack trace:
dbug: 2023-11-15 04:25:40.198834-0500 Microsoft.Maui.Core.DeviceTests[60083:323748] 	0   CoreFoundation                 

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions