Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upload-progress still fired after cancel-all #1693

Closed
AurelienMendes opened this issue Jun 25, 2019 · 3 comments · Fixed by #1736
Closed

upload-progress still fired after cancel-all #1693

AurelienMendes opened this issue Jun 25, 2019 · 3 comments · Fixed by #1736
Assignees
Labels
Bug Tus Resumable file uploading vis tus.io and Uppy Tus plugin

Comments

@AurelienMendes
Copy link

AurelienMendes commented Jun 25, 2019

Hi,

When I want to cancel all my on going uploads (operated with TUS plugin) I get this error :
Uncaught TypeError: Cannot read property 'progress' of undefined

After checking, this error come from (I think) the Uppy core:

this.on("upload-success", function(t, r) {
                var n = e.getFile(t.id).progress; //// here !!!!!!!!
                e.setFileState(t.id, {
                    progress: ___extends_95({}, n, {
                        uploadComplete: !0,
                        percentage: 100,
                        bytesUploaded: n.bytesTotal
                    }),
                    response: r,
                    uploadURL: r.uploadURL,
                    isPaused: !1
                }),
                e._calculateTotalProgress();
            }),

What I understand by seeing the network processes, is that when the cancel-all event is emitted the running processes are indeed cancel but new ones are created :
capture1
You can see on the capture that even if all running processes are canceled, 4 new ones are created (limit: 4 in uppy Tus option). And it is these 4 new ones that generate the errors mentioned above.

This is even more obvious when I pause all uploads before. Everything is paused, and when I click the cancel button, the existing processes are canceled, but 4 new ones are created.

Do you understand what could happen ?

Thanks

@goto-bus-stop
Copy link
Contributor

yeah :/ this is a bug in our queueing code when you use a limit: N option.

@goto-bus-stop goto-bus-stop added Tus Resumable file uploading vis tus.io and Uppy Tus plugin and removed Triage labels Jul 1, 2019
@goto-bus-stop goto-bus-stop self-assigned this Jul 1, 2019
@AurelienMendes
Copy link
Author

AurelienMendes commented Jul 2, 2019

Great ! I am reassured to learn that this is a referenced bug.

Do you already know which release will have the patch for this bug ?

@goto-bus-stop
Copy link
Contributor

I've just started working on a fix for it last week, it's turning out to be quite tricky but we should be able to get it in before the end of the month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Tus Resumable file uploading vis tus.io and Uppy Tus plugin
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants