NEW 197096
AX: Cannot load local file after loaded online page with a wkWebView on iOS12.2
https://bugs.webkit.org/show_bug.cgi?id=197096
Summary AX: Cannot load local file after loaded online page with a wkWebView on iOS12.2
qianyangbiao
Reported 2019-04-19 00:18:33 PDT
Reproduce on iOS 12.2 device: 1.Create a wkwebView like : WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, size.width, (size.height - 100)/2) configuration:[WKWebViewConfiguration new]]; 2.Load online page like : [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://www.baidu.com"]]]; 3.After webView finish load, load a local file like: NSString *filePath = [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"test.html"]; [webView loadFileURL:fileURL allowingReadAccessToURL:fileURL]; Then you can see error like: 2019-04-19 15:17:11.107165+0800 TestWKWebView[10686:386533] [ProcessSwapping] 0x1035382c0 - ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageID = 1, frameID = 1, navigationID = 2 2019-04-19 15:17:11.109566+0800 TestWKWebView[10686:386533] didFailProvisionalNavigation = Error Domain=kCFErrorDomainCFNetwork Code=1 "(null)" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <644E6D87-CC60-4D8D-8B89-3898D4899027>.<31>, _WKRecoveryAttempterErrorKey=<WKReloadFrameErrorRecoveryAttempter: 0x283c87440>}
Attachments
Radar WebKit Bug Importer
Comment 1 2019-04-19 00:18:49 PDT
Note You need to log in before you can comment on or make changes to this bug.