Android Webview becomes slow after a certain Exception

空扰寡人 提交于 2020-01-23 03:24:05

问题


After the exception (listed below) occures the Android Webview becomes noticeably slower. Every action within the webview takes five to ten seconds longer to load. The exception randomly happens after reloading a webview. Sometimes it happens after a few reloads and sometimes it takes up to 400 reloads to occur. It only happens on a webview that opens multiple websockets and it has to be tied to the Chrome engine 78.0.3904 and newer Chrome engines since I couldn't reproduce this Exception on older Chrome engine versions. The application I use to reproduce it doesn't build a connection to the GoogleApiClient and therefore it makes no sense to get an exception about signing in steps to the GoogleApiClient. I already made a Github project about this issue and you can find a sample application to reproduce this issue.

This is the link to the Github project: https://github.com/Ali-Kortak/Websocket-Test

It also seems impossible to catch the exception to be able to handle it properly. The smartphones I reproduced this issue with are the following:

  • Huawei P Smart (Android-Version 9) Chrome Engine Version 78.0.3904

  • Huawei P 20 Pro Chrome Engine Version 78.0.3904

  • Pixel (Android-Version 10) Chrome Engine Version 78.0.3904

  • OnePlus 7t pro (Android-Version 10) Chrome Engine Version 79.0.3945

  • Nexus 5 (Android-Version 10) Chrome Engine Version 78.0.3904

I also found another Stackoverflow post about a similar issue here: Where does a GoogleClientApiConnected exception come from?

This is the exception that is thrown:

E/GoogleApiClientConnecting: GoogleApiClient connecting is in step STEP_SERVICE_BINDINGS_AND_SIGN_IN but received callback for step STEP_GETTING_REMOTE_SERVICE java.lang.Exception 
at qw.b(PG:25) 
at qw.c(PG:36)
at Iw.c(PG:3) 
at Gx.c(PG:2) 
at ly.d(PG:15) 
at gy.a(PG:19) 
at iy.c(PG:6) 
at hy.handleMessage(PG:46) 
at android.os.Handler.dispatchMessage(Handler.java:112) 
at oG.dispatchMessage(PG:1) 
at android.os.Looper.loop(Looper.java:216) 
at android.os.HandlerThread.run(HandlerThread.java:65)

So my question is does anyone know why this exception occures and/or how to fix it?

来源:https://stackoverflow.com/questions/59659906/android-webview-becomes-slow-after-a-certain-exception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!