[偶现问题] 升级到 apkplug 3.9.x 乐视手机冷启动应用 crash
发布于 2 年前 作者 bin.shao 1785 次浏览 来自 问答

偶现,复现概率:20%

  • 设备: LeTV X620/X600/X501/
  • Android OS: 6.0
  • Apkplug version: 3.9.0 ~ 3.9.3 。备注:之前的老版本 v3.2.0 没有这个问题

v3.9.3 崩溃日志

11-30 13:57:49.608 25582 25582 W System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'org.chromium.android_webview.AwContentsClientCallbackHelper org.chromium.android_webview.AwContentsClient.getCallbackHelper()' on a null object reference
11-30 13:57:49.608 25582 25582 W System.err: 	at org.chromium.android_webview.AwWebContentsObserver.documentLoadedInFrame(AwWebContentsObserver.java:61)
11-30 13:57:49.608 25582 25582 W System.err: 	at org.chromium.content.browser.webcontents.WebContentsObserverProxy.documentLoadedInFrame(WebContentsObserverProxy.java:181)
11-30 13:57:49.608 25582 25582 W System.err: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
11-30 13:57:49.608 25582 25582 W System.err: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
11-30 13:57:49.608 25582 25582 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:111)
11-30 13:57:49.608 25582 25582 W System.err: 	at android.os.Looper.loop(Looper.java:207)
11-30 13:57:49.608 25582 25582 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:5896)
11-30 13:57:49.608 25582 25582 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
11-30 13:57:49.608 25582 25582 W System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
11-30 13:57:49.608 25582 25582 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
11-30 13:57:49.608 25582 25615 D SQLiteDatabase: beginTransaction()
11-30 13:57:49.609 25582 25615 D SQLiteDatabase: endTransaction()
11-30 13:57:49.609 25582 25582 E WebView Exception: Exception=java.lang.NullPointerException: Attempt to invoke virtual method 'org.chromium.android_webview.AwContentsClientCallbackHelper org.chromium.android_webview.AwContentsClient.getCallbackHelper()' on a null object reference
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at org.chromium.android_webview.AwWebContentsObserver.documentLoadedInFrame(AwWebContentsObserver.java:61)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at org.chromium.content.browser.webcontents.WebContentsObserverProxy.documentLoadedInFrame(WebContentsObserverProxy.java:181)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at android.os.Handler.dispatchMessage(Handler.java:111)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at android.os.Looper.loop(Looper.java:207)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at android.app.ActivityThread.main(ActivityThread.java:5896)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at java.lang.reflect.Method.invoke(Native Method)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888)
11-30 13:57:49.609 25582 25582 E WebView Exception: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:749)
11-30 13:57:49.609 25582 25582 F chromium: [FATAL:jni_android.cc(235)] Check failed: false. Please include Java exception stack in crash report

调用 Apkplug FrameworkFactory.getInstance().start 看到有 WebView 相关的日志输出

01-09 17:03:16.943 3511-3511/com.xxqq I/System.out: apkplug_framework_version:3.9.3-->128 pid-->com.xxqq
01-09 17:03:16.965 3511-3511/com.xxqq I/System.out: name Linux
01-09 17:03:16.965 3511-3511/com.xxqq I/System.out: arch armv8l
01-09 17:03:16.989 3511-3511/com.xxqq W/System: ClassLoader referenced unknown path: 
01-09 17:03:17.201 3511-3511/com.xxqq I/WebViewFactory: use Letv WebView
01-09 17:03:17.202 3511-3511/com.xxqq I/WebViewFactory: Loading com.le.android.webview version Developer Build (code 1)
01-09 17:03:17.221 3511-3511/com.xxqq W/System: ClassLoader referenced unknown path: /system/app/webview/lib/arm
01-09 17:03:17.225 3511-3511/com.xxqq D/eui_video: webview_entry_point.cc::JNI_OnLoad() -- >>:  ManualJni=0
01-09 17:03:17.225 3511-3511/com.xxqq I/eui_video: webview_jni_onload.cc::OnJNIOnLoadRegisterJNI()
01-09 17:03:17.225 3511-3511/com.xxqq I/eui_video: content_jni_onload.cc::OnJNIOnLoadRegisterJNI()
01-09 17:03:17.225 3511-3511/com.xxqq I/eui_video: library_loader_hooks.cc::EnsureJniRegistered()-->>
01-09 17:03:17.229 3511-3511/com.xxqq I/eui_video: media_jni_registrar.cc::RegisterJni()
01-09 17:03:17.229 3511-3511/com.xxqq I/eui_video: library_loader_hooks.cc::EnsureJniRegistered()-- << 
01-09 17:03:17.231 3511-3511/com.xxqq D/eui_video: webview_entry_point.cc::JNI_OnLoad() -- ok <<
01-09 17:03:17.231 3511-3511/com.xxqq I/cr_LibraryLoader: Time to load native libraries: 8 ms (timestamps 5131-5139)
01-09 17:03:17.231 3511-3511/com.xxqq I/cr_LibraryLoader: Expected native library version number "49.0.2623.91", actual native library version number "49.0.2623.91"
01-09 17:03:17.264 3511-3537/com.xxqq I/TDLog: onEvent being called! eventId: plugin_init_success, eventLabel: 1000, eventMap: null

01-09 17:03:17.353 3511-3511/com.xxqq D/WebView: WebView<init>
01-09 17:03:17.353 3511-3511/com.xxqq V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {d9c61f0}
01-09 17:03:17.353 3511-3511/com.xxqq I/cr_LibraryLoader: Expected native library version number "49.0.2623.91", actual native library version number "49.0.2623.91"
01-09 17:03:17.353 3511-3511/com.xxqq I/chromium: [INFO:library_loader_hooks.cc(152)] Chromium logging enabled: level = 0, default verbosity = 0
4 回复

这个问题是对android 5.0以后webview无法直接加载assets进行的处理,不影响插件允许,但如果遇到这个异常的手机插件webview无法加载assets里面的网页内容

@apkplug 应用刚启动,还没有使用 WebView 哈。另外,目前发生崩溃的手机全是 乐视手机

apkplug 3.9.3版本已经移除这个功能了,可以升级到最新的SDK

@liangdas 确认 apkplug 3.9.3 还存在这个问题,还请看一下呢

回到顶部