Downloading object created by createObjectURL results in 'download failed due to unknown error'
Reported by
rien.kor...@gmail.com,
Jun 14 2017
|
||||||
Issue descriptionSteps to reproduce the problem: 1. Open the minimal reproducer in the attached zip or http://plnkr.co/edit/5vFIm2 2. Click download 3. Observe the 'download failed due to unknown error' notification (see attached screenshot) 4. Go to downloaded files. Open file. 5. Observe that file was correctly downloaded. What is the expected behavior? The 'download failed due to unknown error' notification at #3 should not be observed. What went wrong? The 'download failed due to unknown error' notification at #3 was observed. Did this work before? N/A Chrome version: 58.0.03029.83 Channel: stable OS Version: 7.1.2 Flash Version: Also reported at: - https://github.com/eligrey/FileSaver.js/issues/330
,
Jun 14 2017
,
Jun 15 2017
This should have been fixed in M59, the issue is caused by adding the download to Android DownloadManager after download completion.
,
Jun 21 2017
still seeing this issue in Android Chrome 59.0.3071.92 on Pixel with Android 7.1.2
,
Jun 21 2017
hmm... wierd, i tried this and it worked fine for me.
,
Jun 21 2017
I am using Chrome 59.0.3071.92 and Android 6.0
,
Jun 21 2017
Sorry, the change fixes this issue doesn't make it into Chrome 59, but Chrome 60 Android 6.0 is not affected by this issue, only Android 7 has the issue.
,
Aug 4 2017
With Android 7.0, Chrome 59.0.3071.125 as well as Chrome Beta 60.0.3112.78 on Google Nexus 6, I'm still seeing this issue. (Chrome 60 doesn't seem to be available yet from the Google Play store?). A workaround suggested https://github.com/eligrey/FileSaver.js/issues/330 to use a dataURI to save seems to work but only for tiny files. Is the fix available in Chrome Beta, any plans to port it back to previous versions of Chrome? Seems to be affecting many site that use Javascript to save files...
,
Aug 4 2017
Tested on Chrome Beta 60.0.3112.72, Android 7.1.2, and i don't see the problem. This should be available in Chrome Beta, as https://codereview.chromium.org/2876853007 fixed the problem
,
Aug 6 2017
It appears to work in Chrome Beta for files that are < ~35MB (tested with 10, 20, 30, 35, 40). Files larger seem to fail with the same error message "'download failed due to unknown error'". Larger files however, do work on older versions of Android with older versions of Chrome (tested on Android 6 with Chrome 59.0.3071.125), does not work on Android 6 with Chrome Beta. Does not work on Android 7 with Chrome 59.
,
Aug 6 2017
interesting. does that happen for any data uri>35m? Do you have a link for repro?
,
Oct 24 2017
Same issue with Chrome 61.0.3163.98 on Android 7.0 Data Uri(PDF) with a length of 11213184 fails with 'download failed due to unknown error' Data Uri(PDF) with a length of 15288 is fine. Data Uri(JPG) with a length of 6805643 is fine. Chrome 62 on Windows open all uri(s) without any issues.
,
Oct 24 2017
Reopen this bug to investigate the size issue
,
Oct 24 2017
There's definitely a limit to Data URIs - they're definitely not intended for large resources. See, for example, https://stackoverflow.com/a/41755526/1102201 createObjectURL is the advice for large resources. From https://github.com/eligrey/FileSaver.js/issues/330 it sounds like there's still a download issue for blob objects >30MB that's specific to Android. I created a simple repro here: https://jsbin.com/cukayoy/edit?html,js,output and verified that it fails with the above error on Android Chrome 62.0.3202.52 but it seems to work fine on Chrome Android 63.0.3239.10 (and Windows Chrome 61). Perhaps this has been fixed somehow in Chrome 63? Regardless it seems likely this is specific to the Android downloads code, so removing 'Blink' label.
,
Sep 8
No longer on the Chrome team, e-mail me @google.com if any attention still required from me here, otherwise good luck! |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by rien.kor...@gmail.com
, Jun 14 2017