WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
188995
iOS 12 WKHTTPCookieStoreObserver does not consistently callback on cookie changes
https://bugs.webkit.org/show_bug.cgi?id=188995
Summary
iOS 12 WKHTTPCookieStoreObserver does not consistently callback on cookie cha...
bchenindeed
Reported
2018-08-27 11:29:38 PDT
Created
attachment 348177
[details]
sample project On iOS 12 beta 10 (and earlier), the WKHTTPCookieStoreObserver cookiesDidChange method is not being consistently called. We use the WKHTTPCookieStoreObserver to synchronize login state. Our login occurs in WKWebView which sets cookies with authentication tokens. We then transfer those cookies to our NSURLSession requests to our direct API. As of iOS 12 beta, the WKHTTPCookieStoreObserver, cookiesDidChange method seems to be getting called inconsistently. During debugging (via logs) we see it getting called for some initial requests and then it just stops being called. Attached a sample project that demonstrates issue. Callback is called on initial page load. When you perform a search, cookies are modified, but the observer is never notified. Radar: 43691855
Attachments
sample project
(40.17 KB, application/zip)
2018-08-27 11:29 PDT
,
bchenindeed
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Sihui Liu
Comment 1
2018-08-29 17:38:04 PDT
(In reply to bchenindeed from
comment #0
)
> Created
attachment 348177
[details]
> sample project > > On iOS 12 beta 10 (and earlier), the WKHTTPCookieStoreObserver > cookiesDidChange method is not being consistently called. > > We use the WKHTTPCookieStoreObserver to synchronize login state. Our login > occurs in WKWebView which sets cookies with authentication tokens. We then > transfer those cookies to our NSURLSession requests to our direct API. > > As of iOS 12 beta, the WKHTTPCookieStoreObserver, cookiesDidChange method > seems to be getting called inconsistently. During debugging (via logs) we > see it getting called for some initial requests and then it just stops being > called. > > Attached a sample project that demonstrates issue. Callback is called on > initial page load. When you perform a search, cookies are modified, but the > observer is never notified. > > Radar: 43691855
Hi Brian, thanks for providing the test case. This is a known issue and it's not a webkit bug. We are working on a fix. What we found is the cookie was set successfully but notification of changes was not sent, so a workaround may be using [WKHTTPCookieStore getAllCookies:] inside decidePolicyForNavigationRespons?
Alexey Proskuryakov
Comment 2
2018-08-30 09:54:50 PDT
Marking as invalid as this is an issue outside WebKit. Thank you again for the report!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug