Bug 185666 - Cannot get persistent cookie from file when using custom persistent WKWebsiteDataStore without processpool
Summary: Cannot get persistent cookie from file when using custom persistent WKWebsite...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-15 16:31 PDT by Sihui Liu
Modified: 2022-03-18 11:11 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2018-05-15 16:31:54 PDT
Create a custom persistent WKWebsiteDataStore with specified cookieStorageFile, set a persistent cookie through Cookie API. Then Create another custom persistent WKWebsiteDataStore with same cookieStorageFile, and call getAllCookies from this store, we would get nothing.
Comment 1 Geoffrey Garen 2018-05-16 09:50:48 PDT
Similarly, two uses of the defaultDataStore will not persist cookie changes across process launches.

Similarly, if an app uses a WKWebView and the WKWebView stores some data -- cookies, databases, whatever -- then when the app relaunches I think its defaultDataStore will not be able to get or remove its data, until you first load a webpage.
Comment 2 Radar WebKit Bug Importer 2018-05-17 14:01:35 PDT
<rdar://problem/40343792>
Comment 3 Radar WebKit Bug Importer 2018-05-17 14:02:51 PDT
<rdar://problem/40343788>
Comment 4 Sihui Liu 2022-03-18 11:11:03 PDT
Currently all WKHTTPCookieStores fetch cookies via network process, and on Cocoa platform network process is a singleton, so we will be able to get cookies from different stores with the same cookie file path.