FolioReader-Android icon indicating copy to clipboard operation
FolioReader-Android copied to clipboard

Fatal Exception: kotlin.KotlinNullPointerException when webView (or Chrome) is old

Open cezaryjurkiweicz opened this issue 6 years ago • 4 comments

Android SDK - 7.0, 7.1.1 Crash / Error -

Fatal Exception: kotlin.KotlinNullPointerException
       at com.folioreader.ui.fragment.FolioPageFragment$webViewClient$1.onPageFinished(FolioPageFragment.java)
       at com.android.webview.chromium.WebViewContentsClientAdapter.onPageFinished(WebViewContentsClientAdapter.java:545)
       at org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:201)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6119)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

Steps to reproduce / Describe in detail - Change to night mode

cezaryjurkiweicz avatar May 08 '19 17:05 cezaryjurkiweicz

I foud that this problem is when webview or chrome is not new

cezaryjurkiweicz avatar May 10 '19 13:05 cezaryjurkiweicz

I have the same issue too, that crashes the app at release variant.

onatakduman avatar Jul 14 '19 19:07 onatakduman

@onatakduman did you find any solution?

ashokkumar88 avatar Nov 02 '19 17:11 ashokkumar88

I has also the same issue and it happened when I implement folioReader.setReadLocator(readLocator) where readLocator was null, After I added null check the problem was solved. If you are using setReadLocatorListener in your code it is triggered when you are opening the book and for the first time you are opening the book since there is no saved readLocator it comes null.

ab406 avatar Feb 08 '21 10:02 ab406