android-cookie-store icon indicating copy to clipboard operation
android-cookie-store copied to clipboard

ANR in WebKitSyncCookieManager

Open harsh-rksv opened this issue 1 year ago • 5 comments

    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

harsh-rksv avatar May 08 '24 07:05 harsh-rksv

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?

gotev avatar May 22 '24 18:05 gotev

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)

image

harsh-rksv avatar May 29 '24 09:05 harsh-rksv

hey @gotev can we add a fix for this please?

harsh-rksv avatar Jun 04 '24 11:06 harsh-rksv

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: @.***>

gotev avatar Jun 04 '24 13:06 gotev

@harsh-rksv fork the repository first, commit to your branch on your fork and then you can make the PR 😉

gotev avatar Jun 08 '24 07:06 gotev