Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS crash NSInternalInconsistencyException - Completion handler passed to was not called #1449

Open
ninoid opened this issue Dec 1, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@ninoid
Copy link

ninoid commented Dec 1, 2022

Flutter version 3.3.9
Plugin version 5.7.2
iOS version 16.1.1

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Completion handler passed to -[flutter_inappwebview.InAppWebView webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called'

Attempt to present <UIAlertController: 0x10417a600> on <FlutterViewController: 0x103820c00> (from <FlutterViewController: 0x103820c00>) which is already presenting <_UIDatePickerContainerViewController: 0x1334045a0>.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Completion handler passed to -[flutter_inappwebview.InAppWebView webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called'
*** First throw call stack:
(0x1c4835e88 0x1bdb638d8 0x1c4925c58 0x1d72e4414 0x1d73822e0 0x1d7539d84 0x211888124 0x211887d54 0x102d82354 0x1bea4b134 0x102d821e0 0x1bea4b134 0x102d854fc 0x211888124 0x211887d54 0x1c6dd7734 0x1c6dd761c 0x1bdb4d5d8 0x1bdb50f80 0x1c48fa35c 0x1c48b69d8 0x1c485a598 0x1c48a7fcc 0x1c48aced4 0x1fdbaa368 0x1c6d8b3d0 0x1c6d8b034 0x1023c8564 0x1e2f14960)
libc++abi: terminating with uncaught exception of type NSException

  • thread Screenshots/Images #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x0000000201430200 libsystem_kernel.dylib__pthread_kill + 8 libsystem_kernel.dylib:
    -> 0x201430200 <+8>: b.lo 0x201430220 ; <+40>
    0x201430204 <+12>: pacibsp
    0x201430208 <+16>: stp x29, x30, [sp, #-0x10]!
    0x20143020c <+20>: mov x29, sp
    Target 0: (Runner) stopped.

Is any solution for this?

@ninoid ninoid added the bug Something isn't working label Dec 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 1, 2022

👋 @ninoid

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

@pichillilorenzo
Copy link
Owner

Are you using the onJsAlert event? Could you replicate the issue? Have you tried plugin version 6?

@ninoid
Copy link
Author

ninoid commented Dec 1, 2022

Are you using the onJsAlert event? Could you replicate the issue? Have you tried plugin version 6?

I have tried version 6.0.0-beta.19 and issue still exists

@pichillilorenzo
Copy link
Owner

Please provide enough information to replicate the issue, an example code, or something, otherwise, I can't help you.

@MarsLeo
Copy link

MarsLeo commented Jun 7, 2024

Flutter version 3.13.8
Plugin version 5.7.2+3
iOS version 17.5.1
CoreFoundation
___exceptionPreprocess + 164

1
libobjc.A.dylib
_objc_exception_throw + 60
2
CoreFoundation
-[NSException initWithCoder:]
3
WebKit
WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker() + 144
4
WebKit
WTF::ThreadSafeRefCounted<WebKit::CompletionHandlerCallChecker, (WTF::DestructionThread)0>::deref() const + 44
5
WebKit
WTF::BlockPtr<void ()> WTF::BlockPtr<void ()>::fromCallable<WebKit::UIDelegate::UIClient::runJavaScriptAlert(WebKit::WebPageProxy&, WTF::String const&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, WTF::Function<void ()>&&)::$_8>(WebKit::UIDelegate::UIClient::runJavaScriptAlert(WebKit::WebPageProxy&, WTF::String const&, WebKit::WebFrameProxy*, WebKit::FrameInfoData&&, WTF::Function<void ()>&&)::$_8)::{lambda(void const*)#1}::__invoke(void const*) + 36
6
libsystem_blocks.dylib
__call_dispose_helpers_excp + 48
7
libsystem_blocks.dylib
__Block_release + 252
8
flutter_inappwebview
partial apply forwarder for closure #1 @Swift.MainActor () -> () in flutter_inappwebview.InAppWebView.replaceGestureHandlerIfNeeded() -> () + 16
9
libswiftCore.dylib
__swift_release_dealloc + 56
10
libswiftCore.dylib
bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
11
flutter_inappwebview
objectdestroy.420Tm + 32
12
libswiftCore.dylib
__swift_release_dealloc + 56

13
libswiftCore.dylib
bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
14
libsystem_blocks.dylib
__call_dispose_helpers_excp + 48
15
libsystem_blocks.dylib
__Block_release + 252
16
Flutter
0x0000000105fc8000 + 346712
17
libsystem_blocks.dylib
__call_dispose_helpers_excp + 48

18
libsystem_blocks.dylib
__Block_release + 252
19
libsystem_blocks.dylib
__call_dispose_helpers_excp + 48
20
libsystem_blocks.dylib
__Block_release + 252
21
Flutter
0x0000000105fc8000 + 252236
22
Flutter
0x0000000105fc8000 + 252140
23
Flutter
0x0000000105fc8000 + 253956
24
Flutter
0x0000000105fc8000 + 253652
25
Flutter
0x0000000105fc8000 + 3008128
26
Flutter
0x0000000105fc8000 + 3022060
27
CoreFoundation
_CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION + 32

28
CoreFoundation
___CFRunLoopDoTimer + 1004
29
CoreFoundation
___CFRunLoopDoTimers + 288
30
CoreFoundation
___CFRunLoopRun + 1856
31
CoreFoundation
_CFRunLoopRunSpecific + 608
32
GraphicsServices
_GSEventRunModal + 164
33
UIKitCore
-[UIApplication _run] + 888
34
UIKitCore
_UIApplicationMain + 340
35
channelZaitu
0x0000000104a98000 + 33712
36
dyld
0x00000001af27d000 + 249420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants