FirefoxLite icon indicating copy to clipboard operation
FirefoxLite copied to clipboard

Cookie state is not always synced

Open mTwTm opened this issue 9 years ago • 6 comments

STR:

  1. Login to any page such as Facebook, then swipe Zerda away from task bar.
  2. Open Zerda again.

Expected result: Login session is still valid.

Actual result: Login session is (mostly) invalid.

--

Cookies are stored in the memory and is stored into the persistent store every five minutes. (Source: https://developer.android.com/reference/android/webkit/CookieSyncManager.html) (Note that the class is deprecated so we may want to verify if the condition still holds. My current observation aligns to this claim.)

So we might want to do something like public void onPageFinished(WebView view, final String url) { ... CookieManager.getInstance().flush(); } to flush cookie after each request. like proposed here, but using the not-deprecated api: https://stackoverflow.com/a/8390280/3591480

We may want to make sure this does not have a performance regression before committing this. We may find a way to flush only the request is cookie related too.

mTwTm avatar Jul 24 '17 10:07 mTwTm

oops. we missed it. put it back to triage.

Conjuror avatar Aug 23 '17 03:08 Conjuror

Verified: Fixed

Device: Redmi 4A Rocket: 2.0.0(4045).nightly Android: 7.1.2 Android Webview: 66.0.3359.126

NashTung avatar May 10 '18 03:05 NashTung

I'm not sure if this is fixed. Selfassign to take a look later.

mTwTm avatar May 10 '18 03:05 mTwTm

Hi, the video is as below: https://drive.google.com/open?id=1EfcVf-_9oQDWRmT5BJz8yoUN5eNXgrrf

NashTung avatar May 10 '18 04:05 NashTung

Thanks Nash, I should have stated this clearer. This is not a 100% reproduce rate problem and per I know we haven't landed any code to fix this so I'd like to double check before closing this.

mTwTm avatar May 10 '18 05:05 mTwTm

Video of fail (when Rocket is closed right after login) https://drive.google.com/file/d/1hkW_aoOzAZk7V58fO6Mab9JP1dvhEhjh/view?usp=sharing Video of success (when user waited long enough): https://drive.google.com/file/d/106oooAu2HdpR7ijrd1d86z3_VcufYArJ/view?usp=sharing

mTwTm avatar May 10 '18 07:05 mTwTm