Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x2d5fc __exceptionPreprocess
1 libobjc.A.dylib 0x31244 objc_exception_throw
2 Foundation 0x82dec0 _userInfoForFileAndLine
3 Flutter 0x15420 -[FlutterEngine sendOnChannel:message:binaryReply:] + 1255 (FlutterEngine.mm:1255)
4 Flutter 0x5d3810 -[FlutterBinaryMessengerRelay sendOnChannel:message:binaryReply:] + 34 (FlutterBinaryMessengerRelay.mm:34)
5 Flutter 0x5d6428 -[FlutterBasicMessageChannel sendMessage:reply:] + 120 (FlutterChannels.mm:120)
6 webview_flutter_wkwebview 0x1509c WebKitLibraryPigeonInstanceManagerApi.removeStrongReference(identifier:completion:) + 357 (WebKitLibrary.g.swift:357)
7 webview_flutter_wkwebview 0x13df4 WebKitLibraryPigeonInternalFinalizer.__deallocating_deinit + 532 (WebKitLibrary.g.swift:532)
8 libswiftCore.dylib 0x3d817c _swift_release_dealloc
9 libswiftCore.dylib 0x3d9290 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1>>::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int)
10 libobjc.A.dylib 0x53b0 _object_remove_associations
11 libobjc.A.dylib 0x4f5c objc_destructInstance
12 libobjc.A.dylib 0x4eec _objc_rootDealloc
13 UIKitCore 0x989ec -[UIResponder dealloc]
14 UIKitCore 0x9871c -[UIView dealloc]
15 WebKit 0x58dd18 (Missing UUID 7fd7e19e8e703e7d8133e5c310a242d1)
16 Foundation 0x199054 _NSKVOPerformWithDeallocatingObservable
17 Foundation 0x198d68 NSKVODeallocate
18 libobjc.A.dylib 0x5bac object_cxxDestructFromClass(objc_object*, objc_class*)
19 libobjc.A.dylib 0x4f4c objc_destructInstance
20 libobjc.A.dylib 0x4eec _objc_rootDealloc
21 Flutter 0x365c0 std::_fl::__tree<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::__map_value_compare<long long, std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::less<long long>, true>, std::_fl::allocator<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>>>::destroy(std::_fl::__tree_node<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, void*>*) + 133 (new.cpp:133)
22 Flutter 0x365b4 std::_fl::__tree<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::__map_value_compare<long long, std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::less<long long>, true>, std::_fl::allocator<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>>>::destroy(std::_fl::__tree_node<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, void*>*) + 86 (scoped_typeref.h:86)
23 Flutter 0x365b4 std::_fl::__tree<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::__map_value_compare<long long, std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, std::_fl::less<long long>, true>, std::_fl::allocator<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>>>::destroy(std::_fl::__tree_node<std::_fl::__value_type<long long, fml::scoped_nsobject<NSObject<FlutterPlatformView>>>, void*>*) + 86 (scoped_typeref.h:86)
24 Flutter 0x19b38 std::_fl::__shared_ptr_pointer<flutter::FlutterPlatformViewsController*, std::_fl::shared_ptr<flutter::FlutterPlatformViewsController>::__shared_ptr_default_delete<flutter::FlutterPlatformViewsController, flutter::FlutterPlatformViewsController>, std::_fl::allocator<flutter::FlutterPlatformViewsController>>::__on_zero_shared() + 1087 (__tree:1087)
25 Flutter 0x122c0 -[FlutterEngine destroyContext] + 74 (atomic_support.h:74)
26 CoreFoundation 0x4e488 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
27 CoreFoundation 0x4e3a4 ___CFXRegistrationPost_block_invoke
28 CoreFoundation 0x4cf18 _CFXRegistrationPost
29 CoreFoundation 0x4c01c _CFXNotificationPost
30 Foundation 0x9fa9c -[NSNotificationCenter postNotificationName:object:userInfo:]
31 UIKitCore 0x115c528 -[UIApplication _terminateWithStatus:]
32 UIKitCore 0x1b5644 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]
33 UIKitCore 0x906e8c -[_UISceneLifecycleMultiplexer forceExitWithTransitionContext:scene:]
34 UIKitCore 0x1157c28 -[UIApplication workspaceShouldExit:withTransitionContext:]
35 FrontBoardServices 0x56cd4 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke_2
36 FrontBoardServices 0x1f4c8 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]
37 FrontBoardServices 0x56c74 __63-[FBSWorkspaceScenesClient willTerminateWithTransitionContext:]_block_invoke
38 libdispatch.dylib 0x3fa8 _dispatch_client_callout
39 libdispatch.dylib 0x79f0 _dispatch_block_invoke_direct
40 FrontBoardServices 0x18378 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
41 FrontBoardServices 0x182f8 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible]
42 FrontBoardServices 0x181d0 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource]
43 CoreFoundation 0x73f4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
44 CoreFoundation 0x73ee0 __CFRunLoopDoSource0
45 CoreFoundation 0x76ba4 __CFRunLoopDoSources0
46 CoreFoundation 0x75d3c __CFRunLoopRun
47 CoreFoundation 0xc8284 CFRunLoopRunSpecific
48 GraphicsServices 0x14c0 GSEventRunModal
49 UIKitCore 0x3ee674 -[UIApplication _run]
50 UIKitCore 0x14e88 UIApplicationMain
51 UIKitCore 0x75115c keypath_get_selector_hoverStyle
52 Runner 0x2db6c main (StandaloneAppDelegate.swift)
53 ??? 0x1bf839de8 (Missing)
What package does this bug report belong to?
webview_flutter_wkwebview
What target platforms are you seeing this bug on?
iOS
Have you already upgraded your packages?
Yes
Dependency versions
pubspec.lock
Steps to reproduce
We haven’t been able to reproduce it locally so far. However, we’ve observed a spike in this crash, particularly on iOS 18, though it’s not limited to that version.
Expected results
Not to crash
Actual results
Crash happens on iOS.
Code sample
Code sample
Logs
Logs
Flutter Doctor output
Doctor output