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

Unexpected deletion of uploading images when trying to retry #83

Closed
omcg33 opened this issue Sep 21, 2020 · 2 comments
Closed

Unexpected deletion of uploading images when trying to retry #83

omcg33 opened this issue Sep 21, 2020 · 2 comments

Comments

@omcg33
Copy link

omcg33 commented Sep 21, 2020

I abort and retry items in batch of 7 items, and got this error

batchHelpers.js:13 Uncaught (in promise) TypeError: Cannot read property 'batch' of undefined
    at getBatchFromState (batchHelpers.js:13)
    at triggerUploaderBatchEvent (batchHelpers.js:106)
    at cleanUpFinishedBatch (batchHelpers.js:98)
    at processFinishedRequest.js:65
    at processBatchItems.js:94

And all my not uploaded items is disappeared!

Steps to reproduce:

  1. Slow network speed
  2. Upload 10 items in 1 batch on multiply
  3. Abort and retry all of items step by step
  4. Wait then about 20% of items will be uploaded
  5. Items disappeared and you got error
@yoavniran
Copy link
Collaborator

I've tried reproducing the issue using this story and wasnt able to.
Im also surprised that it threw this error (with that stacktrace) because it means something weird happened with the internal state.

I am adding a conditional so this error shouldnt happen in the future. But again, Im surprised that it did in the first place.

If you can share more of your code so i can better understand how this happened that could help.

Also, I dont understand what you mean by:

And all my not uploaded items is disappeared!

Please explain.
I will just note that you shouldnt rely on the uploader's internal state for building your UI. Uploady will clean up its internal store agressively to maintain the smallest memory footprint possible.

@yoavniran
Copy link
Collaborator

@omcg33 version 0.7.0 is out.
please let me know if you're still facing issues after upgrading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants