[Webkit-unassigned] [Bug 219872] All our cookies get randomly deleted from the NSHTTPCookieStorage. Could be a cookie sync issue between NSHTTPCookieStorage and WKHTTPCookieStore.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 14 16:15:06 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=219872

--- Comment #2 from exu at linkedin.com ---
(In reply to Geoffrey Garen from comment #1)
> > When app users tap for in-app browser with WKWebView, a call from WKWebView to the server is made (either directly or via XMLHttpRequest).  And right after the network call, cookies in NSHTTPCookieStorage are deleted. We suspect there is some bug in the sync between WKHTTPCookieStorage & NSHTTPCookieStorage leading to deletion of cookies from NSHTTPCookieStorage.
> 
> In this case, what method did you use to notice that cookies were removed
> from NSHTTPCookieStorage?

We noticed in our client side logs by listening to NSHTTPCookieManagerCookiesChangedNotification that the cookies disappeared from NSHTTPCookieStorage. Logs on the server side also indicated that cookies didn’t exist in the networking requests. 

> 
> At that time, were the cookies still present in WKHTTPCookieStorage?

Unsure. We didn’t see the cookies in calls made by WKWebView in our server side logs. What we don’t know is that if the cookies are deleted, or if ITP kicked in and block those cookies from being sent to the server?

> 
> > First call after cold launch either in the app or extension/widget doesn’t contain certain cookies but those cookies magically appear after a few milliseconds and subsequent network calls do contain these cookies.
> 
> Is this case distinct from the case where cookies get deleted?
> 
> In this case, what method did you use to notice that cookies were initially
> missing? Were they missing from NSHTTPCookieStorage, WKHTTPCookieStorage, or
> both?

Yes this is a different case, because this only happens on process start and the cookies always reappear after a few 100s of milliseconds. At app start, we only make native calls using NSURLSession, so we know that the cookies were missing from NSHTTPCookieStorage. We don’t know about the state of WKHTTPCookieStorage.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201215/20391b74/attachment.htm>


More information about the webkit-unassigned mailing list