ANR in WebKitSyncCookieManager
init {
handleExceptions {
android.webkit.CookieManager.getInstance().setAcceptCookie(true)
}
}
The default value of setAcceptCookie is true. do we need to still set this? we are facing ANR in production for some device
Good point. This was added to the lib to support custom vendors ROMs which had the default value to false. On which devices have you observerd ANRs because of this?
Its not related to a specific manufacturer/devices. we can see ANR is most standard devices. Added stack trace for more context
java.lang.Runtime.nativeLoad (Native method) java.lang.Runtime.nativeLoad (Runtime.java:1121) java.lang.Runtime.loadLibrary0 (Runtime.java:1075) java.lang.Runtime.loadLibrary0 (Runtime.java:998) java.lang.System.loadLibrary (System.java:1661) WV.Bx.g (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:32) WV.Bx.h (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:27) org.chromium.android_webview.AwBrowserProcess.h (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:34) com.android.webview.chromium.WebViewChromiumFactoryProvider.<init> (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:386) com.android.webview.chromium.WebViewChromiumFactoryProviderForS.<init> (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:1) com.android.webview.chromium.WebViewChromiumFactoryProviderForS.create (chromium-TrichromeWebViewGoogle6432.aab-stable-642208233:3) java.lang.reflect.Method.invoke (Native method) android.webkit.WebViewFactory.getProvider (WebViewFactory.java:355) android.webkit.CookieManager.getInstance (CookieManager.java:50) net.gotev.cookiestore.WebKitSyncCookieManager.<init> (WebKitSyncCookieManager.kt:32) net.gotev.cookiestore.WebKitSyncCookieManager.<init> (WebKitSyncCookieManager.kt:9)
hey @gotev can we add a fix for this please?
Sure, you can prepare the pull request
Il mar 4 giu 2024, 13:37 Harsh Jain @.***> ha scritto:
hey @gotev https://github.com/gotev can we add a fix for this please?
— Reply to this email directly, view it on GitHub https://github.com/gotev/android-cookie-store/issues/38#issuecomment-2147311159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEADXL6HXG4CNPHWQDWBHBTZFWRGJAVCNFSM6AAAAABHMMWHDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXGMYTCMJVHE . You are receiving this because you were mentioned.Message ID: @.***>
@harsh-rksv fork the repository first, commit to your branch on your fork and then you can make the PR 😉