onReceivedError called for PlzNavigate's blob URLs |
||
Issue descriptionPlzNavigate appears to use blob URLs as part of its implementation [1]. However, in multiprocess mode, it appears that we sometimes call onReceivedError for these URLs (perhaps when the corresponding load is canceled). Not sure why this only happens for multiprocess, but I observed this when writing a regression test for issue 781535. I've only reproduced this when we abort a navigation in favor of another one. I'll try to reproduce this in a repro apk. In case it matters, the blob looks like: "blob:file:///d62576ff-aa95-42eb-989c-7a3c7070a539" (or something similar), and it appears to correspond to a real file:// URL I'm trying to load. I observe the network error is WebViewClient.ERROR_CONNECT, which corresponds to several network-layer codes [2]. I assume the fix is to drop network errors for blobScheme (as we do with shouldInterceptRequest [1]), but let me know if we might expect legitimate network errors for app-created blob URLs. Adding PlzNavigate folks in case they understand why we see network errors for these URLs. [1] https://cs.chromium.org/chromium/src/android_webview/browser/net/aw_request_interceptor.cc?l=160 [2] https://cs.chromium.org/chromium/src/android_webview/java/src/org/chromium/android_webview/ErrorCodeConversionHelper.java?q=errorcode.*conversion.*helper+lang:java&sq=package:chromium&l=99
,
Mar 15 2018
> Note that we will soon remove this blob-url mechanism to load the main resource response. Thanks, I'll try the flag. Does that mean the blob URL mechanism will no longer be used at all, or it will still be used for subresources? I want to be sure I test the correct edge case. > What is the "onReceivedError" function you are talking about? WebView surfaces network errors to apps with a callback named WebViewClient#onReceivedError. This is implemented with both (4) and (5) in your list. > In this case, I don't expect you to see PlzNavigate internal blob-URL, only the real URLs. Real URLs can have the blob-scheme too. I agree we should not show implementation details to the app. I was surprised our code saw these internal URLs, but I'm confident the real pages don't contain blobs. Is it likewise unexpected that we see blob URLs in our request intercepter (link [1] from initial report)?
,
Mar 16 2018
Before NavigationMojoResponse, the browser loaded the main resource from the network with the real URL. Then we asked the renderer to load the resource from the browser using a blob-URL. After NavigationMojoResponse, we switch the implementation of the URLLoaderClient from one in the browser process to one in the renderer process, as soon as we know in which process the navigation must commit into. There is no more blob-URL, only the real one. No more using the blob-URL mechanism internally to load the main resource doesn't mean there no more blob-URL. Blob-URLs is a Web feature. See https://developer.mozilla.org/fr/docs/Web/API/Blob Clients can create blob-url and navigate to it. I don't think what you are seeing are PlzNavigate internal blob-URLs. I think you are seeing real blob-URLs. For me, it is unexpected to see an internal blob-URL in WebViewClient#onReceivedError, but it is expected to see them in link [1] from your initial report.
,
Mar 17 2018
Thanks for the clarification, it makes more sense now. I filed issue 822983 to continue the discussion around shouldInterceptRequest. I'll leave this open to continue investigation for internally-created blob URLs in onReceivedError. I don't believe my integration test has any web-created blob URLs, but I'll double check what's going on and update this bug.
,
Apr 24 2018
I'll close this as wontfix, because NavigationMojoResponse has been on by default since dbc14cfafbcff118eb5575534c0439509001e7ef. I'll reopen if I run across similar issues again. |
||
►
Sign in to add a comment |
||
Comment 1 by arthurso...@chromium.org
, Mar 15 2018