Fatal Exception: kotlin.KotlinNullPointerException when webView (or Chrome) is old
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
I foud that this problem is when webview or chrome is not new
I have the same issue too, that crashes the app at release variant.
@onatakduman did you find any solution?
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.