Issue metadata
Sign in to add a comment
|
Invoking revokeObjectURL after downloading file as blob results in a Failed - No file error
Reported by
i...@slimapplications.com,
Mar 16 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.26 Safari/537.36 Example URL: See test code below Steps to reproduce the problem: 1. Use XHR to download a document asynchronously 2. Create a MouseEvent and dispatch it 3. Invoke the revokeObjectURL to release memory What is the expected behavior? The file is downloaded and the blob is no longer listed under chrome://blob-internals/ What went wrong? The download reports an error "Failed - No file" on Chrome 50.0.2661.26 beta. The same code works fine on Chrome 49.0 (stable) and Opera. Invoking the revokeObjectURL with a delay using setTimeout circumvents the problem. Question: is this behaviour by design in Chrome v50? if so, I need to modify my code to cater for this new behaviour of Chrome when using revokeObjectURL. see attached file for screenshot of the error and a code fragment to test. Did this work before? Yes Chrome v49 stable Chrome version: 50.0.2661.26 Channel: beta OS Version: 10.0 Flash Version: Shockwave Flash 21.0 r0 There is a workaround by invoking the revokeObjectURL with a delay but this is not optimal.
,
Mar 17 2016
,
Mar 17 2016
Blink>FileAPI is sufficient, we triage/own both (it should maybe be Blink>Storage>FileAPI)
,
Mar 17 2016
,
Mar 18 2016
Tried creating the html file from the provided Document and clicking the link does not downloads any file. It gives the following error in console(Screen Shot provided). Could some one please guide us for the same. Thanks.!
,
Mar 18 2016
Hi, the html file(s) needs to be uploaded to a web server. Upon opening the html file named downloadFile_Pass.html in Chrome and the clicking the link the html file itself is downloaded. In the case of downloadFile_Fail.html the "Failed - No file" error is shown. thanks for looking into this.
,
Mar 18 2016
Addition to comment 6. I have uploaded the files to a web server. Please see: http://www.iq-solutions.nl/downloadFile_Fail.html http://www.iq-solutions.nl/downloadFile_Pass.html thanks
,
Mar 18 2016
Thank you for providing more feedback. Assigning to requester "ranjitkan@chromium.org" for another review. For more details visit https://sites.google.com/a/chromium.org/dev/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 21 2016
Thanks for the details provided. I was able to download both the files from the above two links on build "50.0.2661.37" Beta and Canary - 51.0.2686.0. Same result is observed on Stable 49.0.2623.87. And please let us know what is that we need to verify under "chrome://blob-internals/" A screen shot would be more helpful. Thanks.!
,
Mar 21 2016
Hi, please find attached a Word file with the requested details. Clicking on the link "download current file" after opening the file downloadFile_Fail.html results in an error "Failed - No File" on Chrome 50. This works fine on Chrome 49. Note: the download of the blob is handled through mimicing a mouse event. Any chance that is now done asynchronously in v50? thanks
,
Mar 21 2016
Thanks a lot for the details provided. Able to reproduce the issue on Windows, MAC 10.11.3, Ubuntu 14.04 and is a regression broken in M50 builds. below are bisect details for the same. Bisect info: ============ 50.0.2634.0 - Good build 50.0.2635.0 - Bad build Bisect URL: https://chromium.googlesource.com/chromium/src/+log/eac0ccddbbc380e8960228a7989e31a8135fa209..3c4b22daaa8bc6f5ea7da25af0b7c1a7aa957b09 Suspecting the below change could be the possible suspect: https://chromium.googlesource.com/chromium/src/+/bb028fc67f0835b30bd2ce5d953caa101c15c961 Review URL: https://codereview.chromium.org/1644743003 @asanka: Request you to please take a look into it. Please help us to reassign if not with respect to your change.
,
Mar 21 2016
The CL mentioned in #11 affects the timing between the download "starting" and the time at which revokeObjectURL() effectively releases the Blob URL. If the download start prior to revokeObjectURL(), then ResourceDispatcherHostImpl will obtain a handle to the blob data and attach it to the URLRequest via a UserData object. If the download loses the race, then the blob would no longer be around by the time ResourceDispatcherHostImpl looks at blob storage. That said, I'm not sure whether the browser should offer the guarantee that dispatching a click event on an anchor with @download gives the impression of starting synchronously to the extent that revoking the URL immediately afterwards is inconsequential.
,
Mar 21 2016
Does the DownloadUrl message get sent prior to return from dispatching the click event in blink? If so, it'd be straightforward to grab a blobhandle in DownloadUrl and to include it in the DownloadUrlParameters. I think that might be necessary even if the message is not sent prior to return from dispatching the click event, although if the ipc is deferred that change is insufficient.
,
Mar 22 2016
#13: yeah, we can get a BlobHandle and pass it along with the DownloadUrlParameters at the point when the renderer receives the DownloadUrl IPC on the IO thread.
,
Mar 25 2016
https://codereview.chromium.org/1829413002
,
Mar 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6150c52a037d3b05eeac0faaf792ab0203b5580f commit 6150c52a037d3b05eeac0faaf792ab0203b5580f Author: asanka <asanka@chromium.org> Date: Fri Mar 25 21:40:57 2016 [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. This allows a caller to extend the lifetime of a blob until the downloads / resource loader subsystems take over. Without this, an unfortunately timed revokeObjectURL() call from the originating page may invalidate the URL before the download has a chance to start the associated download request. BUG= 595305 Review URL: https://codereview.chromium.org/1829413002 Cr-Commit-Position: refs/heads/master@{#383370} [modify] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/browser/download/download_browsertest.cc [modify] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/browser/download/download_manager_impl.cc [modify] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/browser/renderer_host/render_message_filter.cc [modify] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/public/browser/download_url_parameters.h [add] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/test/data/download/download-attribute-blob.html [add] https://crrev.com/6150c52a037d3b05eeac0faaf792ab0203b5580f/content/test/data/download/download-attribute-blob.html.mock-http-headers
,
Mar 25 2016
I'll wait for a Canary or two before requesting a merge.
,
Mar 28 2016
Requesting merge. This regression dates back to crrev.com/bb028fc67f0835b30bd2ce5d953caa101c15c961 which was pulled into M50. The change has baked in Canary over the weekend and introduced no new crashes.
,
Mar 28 2016
Your change meets the bar and is auto-approved for M50 (branch: 2661)
,
Mar 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/58242aeb11363fe0436724aefdc56faaf53321e4 commit 58242aeb11363fe0436724aefdc56faaf53321e4 Author: Asanka Herath <asanka@chromium.org> Date: Mon Mar 28 15:38:42 2016 [Merge M50] [Downloads] Retain a BlobDataHandle in DownloadUrlParameters. This allows a caller to extend the lifetime of a blob until the downloads / resource loader subsystems take over. Without this, an unfortunately timed revokeObjectURL() call from the originating page may invalidate the URL before the download has a chance to start the associated download request. BUG= 595305 Review URL: https://codereview.chromium.org/1829413002 Cr-Commit-Position: refs/heads/master@{#383370} (cherry picked from commit 6150c52a037d3b05eeac0faaf792ab0203b5580f) Review URL: https://codereview.chromium.org/1835913002 . Cr-Commit-Position: refs/branch-heads/2661@{#403} Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081} [modify] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/browser/download/download_browsertest.cc [modify] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/browser/download/download_manager_impl.cc [modify] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/browser/loader/resource_dispatcher_host_impl.cc [modify] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/browser/renderer_host/render_message_filter.cc [modify] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/public/browser/download_url_parameters.h [add] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/test/data/download/download-attribute-blob.html [add] https://crrev.com/58242aeb11363fe0436724aefdc56faaf53321e4/content/test/data/download/download-attribute-blob.html.mock-http-headers
,
Mar 28 2016
Issue 597003 has been merged into this issue.
,
Mar 30 2016
Tested the issue on windows 7, Linux Ubuntu 14.04 and Mac 10.11.3 using chrome version 50.0.2661.57. Not observed the error "Failed - No File" when clicked on "download current file" from downloadFile_Fail.html. Please find the attached screen cast for the same. adding TE-Verified
,
Jun 15 2018
,
Jun 15 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by rsleevi@chromium.org
, Mar 17 2016