This.uppy.log throwing error

Started by lrlarson5 replies504 views
lrlarsonOriginal post
#1

Hello,

I am getting the following error in Uppy when I attempt to upload.

Screen Shot 2021-10-11 at 4.02.29 PM

Everything else is working fine, but the the uppy.log() function is not recognized. Any ideas?

MerlijnTransloadit team
#2

Hi, this has been fixed already. Please upgrade to the latest version of Uppy 🙂

#3

Thank you for getting back to me.

I am using v 2.0.2

[Uppy] [11:36:28] Using XHRUpload v2.0.2

But I am still getting this error in the uppy code:

Screen Shot 2021-10-12 at 11.37.40 AM.png

index.js:116 Uncaught TypeError: Cannot read properties of undefined (reading ‘log’)
at Object.getResponseData (index.js:116)
at XMLHttpRequest. (index.js:287)

Further thoughts?

Thank you for your time.

Larry

#4

I should add that the files are being uploaded successfully…The bug is in handling the result. Here is the complete console log:

Screen Shot 2021-10-12 at 11.44.31 AM.png

#5

I finally commented out the line

getResponseData(responseText) {
  let parsedResponse = {};

  try {
    parsedResponse = JSON.parse(responseText);
  } catch (err) {
    //this.uppy.log(err);
  }

  return parsedResponse;
},

And everything works.

Am I the only person for whom this has been an issue?

Again, thanks for helping.

MerlijnTransloadit team
#6

Please upgrade the latest version. Here is the commit with the fix. Available in Uppy CDN bundle 2.2.0 or the 2.0.4 version of @uppy/xhr-upload.