httpCookieStore.getAllCookies sometimes doesn't call its callback

Originator:davidmuzi
Number:rdar://39470983 Date Originated:April 16 2018
Status:Closed as duplicate Resolved:
Product:iOS Product Version:11
Classification: Reproducible:Sometimes
 
Area:
WebKit

Summary:
We use the httpCookieStore.getAllCookies when running on iOS 11 to check for an existing session cookie before attempting to authenticate the web session with our web service.  
We have received reports that sometimes the web pages do not load properly.  After adding some analytics tracking, we found that ~16% of the calls to httpCookieStore.getAllCookies do not call the callback.

Steps to Reproduce:
I cannot reproduce this locally.  I have built a sample app, with a tight loop and tracking to detect each call to httpCookieStore.getAllCookies, and the callback - and all succeed.
From analytics in the published app, I could not find any correlation on the failed calls for the device, OS version, network connection, or URL being loaded.

Expected Results:
The callback to be called exactly once.

Actual Results:
16% of the times the callback is never called

Version/Build:
iOS 11 - iOS 11.3

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!