-
Notifications
You must be signed in to change notification settings - Fork 3k
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
I get crash in iOS11 ..... #302
Comments
This is a must-have crash info:
and stack info
|
i have the same bug |
1 similar comment
i have the same bug |
So how do we solve this problem? |
this bug occur in XCode9 iOS11. |
maybe you can add this: if ([_base isWebViewJavascriptBridgeURL:url]) { |
in my project.
Can be resolved by the above code. But do not know will not cause other effects. 可以看这里。 |
Also - please note that the current testPerformanceExample test fails when you run make test with XCode 9 installed.
|
I have the same bug. |
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. |
i have the same bug but see something beside, when run in xcode8 and ios11 the crash didn't happened. |
I have the same bug. |
set WKWebview navigationDelegate |
I have the same bug ,thank for @huanghualove ,I had got it |
I have the same bug. |
thank for @huanghualove, it help me ! |
a0cfcf6 With reference to this, I hope to be of help to you. |
i have the same bug |
That`s solve my problem |
------------------ 原始邮件 ------------------
发件人: "BeyondChao";<notifications@github.com>;
发送时间: 2017年9月21日(星期四) 中午1:59
收件人: "marcuswestin/WebViewJavascriptBridge"<WebViewJavascriptBridge@noreply.github.com>;
抄送: "呵呵哒"<3190171489@qq.com>; "Comment"<comment@noreply.github.com>;
主题: Re: [marcuswestin/WebViewJavascriptBridge] I get crash in iOS11 .....(#302)
- (void)webView:(WKWebView*)webView decidePolicyForNavigationAction:(WKNavigationAction*)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { WebViewJavascriptBridgeBase *base = [[WebViewJavascriptBridgeBase alloc] init]; if ([base isWebViewJavascriptBridgeURL:navigationAction.request.URL]) { return; } // Add this IF statement in my project, don`t need modify WebViewJavascriptBridge`s source code. decisionHandler(WKNavigationActionPolicyAllow); }
That`s solve my problem
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
It gave me a great help, thanks
|
I have the same bug |
can we get a fix for this? @marcuswestin |
In WKWebViewJavascriptBridge ,I modify
|
@huanghualove, @XGPASS, @NXZXing 你们的解决方案只能解决崩溃的bug, 但是js交互事件都没有了(Your solution can only solve the crash of the bug, but js interactive events are gone!!!) |
@wangjunling888 js交互事件依然可以使用; |
@XGPASS 我这边还是不行, 你可以吧你的demo发给我一份吗? 非常感谢!!! |
@XGPASS 我的邮箱 987424476@qq.com |
@wangjunling888 I test these code, but donot have the problem that you described. |
@wangjunling888 https://github.com/XGPASS/XGDevelopDemo
or modify
我猜测主要原因是 Xcode9上,decisionHandler() 这个block回调,不允许多次被调用; |
@XGPASS 收到, 非常感谢, 我测试一下吧, 我的修改之后还是不行, 只是不崩溃了, 但是所有的交互事件都没有了, 我在找找原因吧! |
if (webView != _webView) { return; }
|
decisionHandler这个方法调用了两次导致崩溃,下面是我修改的代码,测试可用 if (webView != _webView) { return; }
|
中国的小朋友看这里,我用了@huanghualove的办法是可以的,而且交互都还在,没毛病,可以解决问题的,我这个情况是用xcode9跑的程序加载wkwebview会出现崩溃,打印台提示'Completion handler passed to -[WKWebViewJavascriptBridge webView:decidePolicyForNavigationAction:decisionHandler:] was not called',不仅是在iOS 11上崩溃,而且在iOS 10上也崩溃,可以断定是xcode 9导致的问题,大家快去修改吧,不过上面有人说这么做会导致交互没有了,各位你们试试吧,有什么好的方法也发上去 |
Nothing's working for me on my end. I hope an official patch is coming soon. |
I have the same bug. |
what is the _webViewDelegate |
hope to fix |
See pull request, adding return will work for me. |
I have the same bug. |
Fixed in #296. |
'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!
cd
into it and runmake test
. All tests should pass!Tests/WebViewJavascriptBridgeTests/BridgeTests.m
and create a new, failing test which demostrates your issue.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
The text was updated successfully, but these errors were encountered: