Closed
Description
'Completion handler passed to -[WKWebViewJavascriptBridge webView:decidePolicyForNavigationAction:decisionHandler:] was not called'
reason: 'Completion handler passed to -[WKWebViewJavascriptBridge webView:decidePolicyForNavigationAction:decisionHandler:] was called more than once'
How to resolve this problem ?? thank you .
WVJB Bug Report
Thanks for reporting an issue with WebViewJavascriptBridge.
Do these 4 things and I will fix your problem!
- Go to https://github.com/marcuswestin/WebViewJavascriptBridge and click Fork.
- Clone your fork,
cd
into it and runmake test
. All tests should pass! - Edit
Tests/WebViewJavascriptBridgeTests/BridgeTests.m
and create a new, failing test which demostrates your issue. - Create a pull request for https://github.com/marcuswestin/WebViewJavascriptBridge
That's it!
I will take it from there and promise that I'll fix your problem ASAP.
If you don't do this then I can't help you!
And I probably won't :)
Cheers,
@marcuswestin
Metadata
Metadata
Assignees
Labels
No labels
Activity
madordie commentedon Sep 14, 2017
@marcuswestin
This is a must-have crash
info:
and stack info
wealon commentedon Sep 15, 2017
i have the same bug
ranshon commentedon Sep 18, 2017
i have the same bug
huanghualove commentedon Sep 18, 2017
So how do we solve this problem?
ranshon commentedon Sep 18, 2017
this bug occur in XCode9 iOS11.
huanghualove commentedon Sep 18, 2017
maybe you can add this:
if ([_base isWebViewJavascriptBridgeURL:url]) {
if ([_base isBridgeLoadedURL:url]) {
[_base injectJavascriptFile];
} else if ([_base isQueueMessageURL:url]) {
[self WKFlushMessageQueue];
} else {
[_base logUnkownMessage:url];
}
decisionHandler(WKNavigationActionPolicyCancel);
return; // add This-------
}
madordie commentedon Sep 19, 2017
in my project.
Can be resolved by the above code. But do not know will not cause other effects.
可以看这里。
InfAspire commentedon Sep 19, 2017
Also - please note that the current testPerformanceExample test fails when you run make test with XCode 9 installed.
longshao521 commentedon Sep 20, 2017
I have the same bug.
yinanwang1 commentedon Sep 20, 2017
I have the same bug. I found this bug in the iOS 11 beta one month ago. I thought this crash must be resoled in the iOS 11. But it did not. So Apps will crash if the user upgrade their iPhone.
AdamYLK commentedon Sep 20, 2017
i have the same bug but see something beside, when run in xcode8 and ios11 the crash didn't happened.
the bug in xcode9 with ios11,i think it may crashed by xcode9
fifyrio commentedon Sep 20, 2017
I have the same bug.
zeroskylian commentedon Sep 20, 2017
set WKWebview navigationDelegate
coderWeil commentedon Sep 20, 2017
I have the same bug ,thank for @huanghualove ,I had got it
NXZXing commentedon Sep 20, 2017
I have the same bug.
29 remaining items