cinely / mule-uploader

Stubborn HTML5 Amazon S3 uploader
http://mule-uploader.com/
MIT License
223 stars 43 forks source link

Uploads not completed (follow-up) #35

Open ElderBrE opened 10 years ago

ElderBrE commented 10 years ago

Following up from closed issue #16 (https://github.com/cinely/mule-uploader/issues/16):

While I haven't been able to replicate the issue myself, every now and then I get users about this problem. Now I finally got one who is always having this issue and asked him to get a screenshot of the console output. Here is what is shown when the upload finishes:

Failed to load resource: the server responded with a status of 404 (Not Found) Uncaught TypeError: string is not a function (js file line 997) 6 Errors: Failed to load resource: the server responded with a status of 403 (Forbidden) Failed to load resource: the server responded with a status of 404 (Not Found) Uncaught TypeError: string is not a function (js file line 997)

Line 997 is the error_callback(); from below:

        if(e.target.status === 404) {
            // i.e. the file was already uploaded; start fresh
            if(error_callback) {
                error_callback();
            }
            return;
        }

It seems it can't find the file after upload to put it together. Any clues?

gabipurcaru commented 10 years ago

No idea unfortunately. Do you know what browser/version they used? Also, what version of mule are you using? Is it the latest or the V2 one?

gabipurcaru commented 10 years ago

It seems like error_callback is somehow given as a string instead of a function (the name of a function?). I'll fix that, but it doesn't fix the underlying cause.

ElderBrE commented 10 years ago

It was latest Chrome on OS X in this case, and I'm giving them the very latest version where you removed the web workers. It's happened several times to them now and I'm not sure what to tell them. Anything that would help you find the underlying error? I'm going to see if I can setup a manual call to S3 to mount the pieces and see what happens.

gabipurcaru commented 10 years ago

Can you give me a link to your page where I can test it? I have my email available in my profile, you can send me a message.

ElderBrE commented 9 years ago

Okay so now I have a way to test this quite effectively... creating a bucket on a region on other side of the planet from the uploader.

It seems the problem is with the distance from the uploader to the receiving bucket's amazon server. This rarely happens when close to the region, but it becomes more apparent the farther away the user is.

Might have to create buckets all over the planet to avoid issues...

With this, I have also noticed that chunks fail a lot, 403 forbidden errors thrown several times during an upload, which cause the upload to take much longer as the uploader has to retry that chunk. I wonder if it's all due to the same thing.