devedbox / AXWebViewController

AXWebViewController is a webViewController to browse web content inside applications. It’s a lightweight controller on iOS platform based on WKWebView (UIWebView would be the base Kit under iOS 8.0). It added navigation tool bar to refresh, go back, go forward and so on. It support the navigation style on WeChat. It is a simple-using and convenient web view controller using inside applications.
MIT License
797 stars 134 forks source link

reason: 'Cannot remove an observer <AXWebViewController 0x7f9de1011c00> for the key path "estimatedProgress" from <WKWebView 0x7f9ddf811600> because it is not registered as an observer.'的报错 #59

Open honeybeeSwinging opened 6 years ago

honeybeeSwinging commented 6 years ago

目标

我想集成进项目中

预期的结果

给网址就可以访问

实际的结果

运行起来就闪退了

比如:崩溃的控制台打印这个,提示这个错位 reason: 'Cannot remove an observer <AXWebViewController 0x7f9de1011c00> for the key path "estimatedProgress" from <WKWebView 0x7f9ddf811600> because it is not registered as an observer.'

使用Exception Breakpoint会定位到[_webView removeObserver:self forKeyPath:@"estimatedProgress"];这行代码

问题复现的步骤

issue复现所需的步骤,尽量详细!

直接新建了一个项目,在新建项目中的viewcontroller 的.m 文件中,下面网址去掉了

}

示例代码

提供一个突出问题的代码示例或测试用例. 对于量较大的代码示例,链接到外部的gists/repositories是首选. 需要保密的话通过邮件devedbox@qq.com分享,邮件主题写issue的名称. 问题严重的话可以提供完整的Xcode工程最好!

AXWebViewController和工具的版本

echo "\`\`\`
$(sw_vers)

$(xcode-select -p)
$(xcodebuild -version)

$(which pod && pod --version)
$(test -e Podfile.lock && cat Podfile.lock | sed -nE 's/^  - (Realm(Swift)? [^:]*):?/\1/p' || echo "(not in use here)")

$(which bash && bash -version | head -n1)

$(which carthage && carthage version)
$(test -e Cartfile.resolved && cat Cartfile.resolved | grep --color=no realm || echo "(not in use here)")

$(which git && git --version)
\`\`\`" | tee /dev/tty | pbcopy

复制以上内容到终端回车,就可以获取到版本信息. 获取到版本信息之后,请将以上脚本删除!

AXWebViewController版本: pod 'AXWebViewController', '~> 0.6.0'

Xcode版本: Version 9.1 (9B55)

iOS/OSX版本: iPhone 8 的模拟器

依赖管理工具(cocoapods)版本: pod --version之后显示 1.4.0.beta.2

devedbox commented 6 years ago

@honeybeeSwinging 问题不能复现

KaoUserName commented 5 years ago

testWeb.zip 不管是用pod,还是带axweb拉入项目都会报这个错。但是在你的Demo实现相同的代码是没有问题的