cinely / mule-uploader

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

uploads not completed #16

Closed kookster closed 10 years ago

kookster commented 10 years ago

We are seeing our users uploads often will complete uploading all chunks, but then the upload is not completed on s3 - e.g. the finish_upload method is either not being called or not succeeding in these cases. Have anyone else experienced this, or have ideas on what to do?

kookster commented 10 years ago

I should mention I have not personally had this happen, and have no actual browser console log, so I don't know at what point it is failing.

gabipurcaru commented 10 years ago

There is a small bug where sometimes the upload goes to 100%, but some chunks are not actually completed, but the upload goes back to 95-99%, uploads the missing chunks and then it completes. I'll have to do some more testing. Are you using the latest version or some older one? (there's no versioning in place right now -- I'll have to add that --, but you can check the commit log).

ElderBrE commented 10 years ago

Yep, several of my users have this happen as well. Generally, it will go back down to 95-99% as Gabi says, but every now and then it just goes up to 100% and that's all it does, doesn't try to obtain the missing chunks or finish the upload. The worst of when that happens is that when they reload the page and load the same file, it starts all over from 0 as if the upload really had been completed.

Personally I have not been able to replicate, but I've had enough reports over the months to know it is indeed a bug somewhere. Using latest version here.

gabipurcaru commented 10 years ago

The uploads shouldn't have this problem anymore as of the implementation of V4 signatures. Please let me know if the problem persists though.

ElderBrE commented 10 years ago

Thanks, will test as soon as the php backend is updated as I don't have much time this month to figure out the signatures system

gabipurcaru commented 10 years ago

Closing this because there were not updates. Reopen if the problem persists.

ElderBrE commented 10 years ago

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?

kookster commented 10 years ago

I have seen occasions with s3 where there is a lag between storing a new object and when it is available and responds to requests - usually not more than a few seconds. My solution in other systems to this is to have a retry loop when checking after a store that sleeps and retries for up to a few (e.g. 10) seconds.

Andrew Kuklewicz

On Fri, Aug 22, 2014 at 5:02 AM, ElderBrE notifications@github.com wrote:

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?

— Reply to this email directly or view it on GitHub https://github.com/cinely/mule-uploader/issues/16#issuecomment-53038594.