Last modified: 2013-05-19 04:51:04 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T42586, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40586 - Chunked uploads: fails immediately when trying to upload large JPEG due to binReader.result being undefined
Chunked uploads: fails immediately when trying to upload large JPEG due to bi...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-28 00:18 UTC by Derrick Coetzee
Modified: 2013-05-19 04:51 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Derrick Coetzee 2012-09-28 00:18:03 UTC
I was trying to upload a JPEG file using chunked uploads. It is 270 MB (283,562,965 bytes) and 24576 x 29696 (730 megapixels / 729808896 pixels). The file was created using ImageMagick 6.7.9-8 2012-09-22 Q16 ("convert a.tiff a.jpg"). As soon as I try to upload it fails immediately at:

Error: http://bits.wikimedia.org/static-1.20wmf12/extensions/UploadWizard/resources/mw.UploadWizardUpload.js at line 471: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMFileReader.result]

 if( this.file.type === 'image/jpeg' ) {
     var binReader = new FileReader();
     binReader.onload = function() {
         var binStr;
         if ( typeof binReader.result == 'string' ) {
>            binStr = binReader.result;
         } else {

Debugging in Firebug shows that binReader.result is undefined at the time of failure.

binReader FileReader {readyState=2,onload=[xpconnect wrapped nsIDOMEventListener],EMPTY=0, more...}
   DONE=2,
   EMPTY=0,	
   LOADING=1,
   error=null,
   onloadend=null,
   readyState=2,
   result=undefined,
   constructor=[object FileReader],
   abort=abort(),
   addEventListener=addEventListener(),
   dispatchEvent=dispatchEvent(),
   getInterface=getInterface(),
   readAsArrayBuffer=readAsArrayBuffer(),
   readAsBinaryString=readAsBinaryString(),
   readAsDataURL=readAsDataURL(),
   readAsText=readAsText(),
   removeEventListener=removeEventListener(),
   __proto__=[xpconnect wrapped native prototype] { ... }

I got the same failure in Chrome and Firefox. IE apparently has no chunked uploads support at all, as I'm unable to upload any file in it, it just claims to be uploading but uses no bandwidth.

I have no trouble uploading a smaller 90 MB JPEG file.
Comment 1 Derrick Coetzee 2012-09-28 00:37:13 UTC
An update: I re-encoded the same image at 70% quality, bringing it down to 109 MB, and it uploaded with no problem. At 80% quality (144 MB) it failed. This suggests the image size/format/generation process are not at issue, but rather the file size in combination with the file type. Also, the maximum appears to be somewhere between 109 and 144 MB (perhaps 128MB? might be a browser limitation?)
Comment 2 Derrick Coetzee 2012-09-28 01:01:35 UTC
Another update: the file size trials in the previous comment were done on Chrome on Windows 7 x64 with 8 GB RAM. When moving to Firefox on Ubuntu Linux 64-bit with 2 GB of RAM, the same issue occurred but the maximum size was considerably higher: somewhere between 175 MB and 277 MB, about twice as much.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links