Error: Cannot read property 'id' of undefined when uppy.cancelAll() is called
See original GitHub issueFirst, I want to start by thanking you guys for working on such great file upload package.
To reproduce the issue try to upload multiple files using the AWS S3 provider
- Drag & drop multiple files into the file uploader or use the open file dialog.
- Abort/Cancel the upload using
uppy.cancelAll()
- the file uploader will show an error alert
Cannot read property 'id' of undefined
Please see the screenshots
The error alert
the thrown error
The block of code that caused it
maybe changing this condition https://github.com/transloadit/uppy/blob/1dd4d79aa79526cc52e516f7126e71d492b5f83c/packages/%40uppy/core/src/index.js#L855
to something like
if (!file || !this.getFile(file.id)) {
this.log(`Not setting progress for a file that has been removed: ${file.id}`)
return
}
may solve it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:11 (3 by maintainers)
Top Results From Across the Web
const - Uppy
id : 'uppy'. A site-wide unique ID for the instance. If several Uppy instances are being used, for instance, on two different pages,...
Read more >Cannot read property ,,'id'''' of undefined - Stack Overflow
It seems that the code has failed to find the muteRole on this line: let muteRole = message.guild.roles.cache.find(role => role.name ...
Read more >Cannot read property 'id' of undefined - Page 2
I got this error when transfer money to my friends, what dose it mean ?
Read more >Falcon Sandbox v8.48.7 © Hybrid Analysis
MarkMonitor, Inc. Organization: Microsoft Corporation Name Server: NS1-05.AZURE-DNS.COM Creation Date: 2018-10-25T18:11:25, Flag ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That check would work, but I think we should do it in the AwsS3 plugin itself, and not emit the
preprocess-complete
event if the file doesn’t exist anymore: https://github.com/transloadit/uppy/blob/733de659da17ee77afba9882633477fb7cd778dd/packages/%40uppy/aws-s3/src/index.js#L172-L175(That
if()
statement in@uppy/core
is a hack to try to paper over these bugs 😞 we should avoid emitting events with removed file objects as much as possible!)@VivekSingh777 please do! lmk if you need any more pointers
Can I work on this issue?