Bug 198499 - Network connection fails with error 53 just after NetworkProcess resumes
Summary: Network connection fails with error 53 just after NetworkProcess resumes
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2019-06-03 14:42 PDT by Ali Juma
Modified: 2019-06-05 22:13 PDT (History)
5 users (show)

See Also:

Test app that reproduces the bug (58.84 KB, application/zip)
2019-06-03 14:42 PDT, Ali Juma
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2019-06-03 14:42:42 PDT
Created attachment 371215 [details]
Test app that reproduces the bug

Steps to reproduce on an iOS device:
1) Create a WKWebView and load some content into that view
2) Hide that view, triggering its NetworkProcess to get suspended
3) Wait 10-20 seconds
4) Create another WKWebView using the same WKWebViewConfiguration (and hence the same WKProcessPool and NetworkProcess) and call loadRequest

Sometimes, the load at (4) will fail and an error will be logged: “com.apple.WebKit.Networking	27551	nw_protocol_boringssl_error(1584) <private>[0x109155030] Lower protocol stack error: 53”

This only happens on-device. To reproduce this, it seems to be critical that:
-both WKWebViews use the same WKProcessPool
-the first WKWebView is hidden and its processes suspended
-the second WKWebView starts a loadRequest around the same time that the NetworkProcess resumes
Comment 1 John Wu 2019-06-03 16:21:57 PDT
GitHub issue that points to a related issue where firing network requests as the process if coming back into the foreground would produce the same error code 53:

Comment 2 John Wu 2019-06-03 17:01:25 PDT
I have no idea why this may be, but it is infinitely easier to reproduce this when you have the Console.app connected to the iOS device.
Comment 3 Radar WebKit Bug Importer 2019-06-05 22:13:31 PDT