question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Cannot read property 'id' of undefined when uppy.cancelAll() is called

See original GitHub issue

First, 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

Annotation 2019-10-08 160746

the thrown error

Annotation 2019-10-08 160437

The block of code that caused it

Annotation 2019-10-08 160502

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
goto-bus-stopcommented, Oct 9, 2019

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

2reactions
VivekSingh777commented, Oct 8, 2019

Can I work on this issue?

Read more comments on GitHub >

github_iconTop 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 >
uppy - UNPKG
The CDN for uppy.
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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found