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 when resizing image TypeError: Cannot set property 'resizedImage' of undefined

See original GitHub issue

Hello, I installed the Resize Image Extension but it breaks with the following error:

Error when resizing image TypeError: Cannot set property 'resizedImage' of undefined

Screenshot: Screenshot from 2019-12-10 09-50-06

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Ehespcommented, Dec 19, 2019

I’m struggling to reproduce this. I’ve tried an existing instance and a totally fresh one but I can’t trigger this error.

Could I ask how you are uploading an image? (e.g. web console vs Web SDK vs Android SDK etc).

If I were to stake a guess, when the image is added, we pass it’s data into the resizer function, which attempts to assign a metadata.resizedImage field on-top of the original images metadata. I think that depending on how the image is uploaded , that image may not be created with an original metadata field, therefore this error occurs as it’s trying to assign a property to something which doesn’t exist.

A simple fix would be to change this line to metadata: objectMetadata.metadata || {},.

I’d be interested to see though why no metadata is being created by default, to understand where that happens.

1reaction
utsav1322commented, Dec 11, 2019

Hello, I’m Facing Same Issue Error when resizing image TypeError: Cannot set property ‘resizedImage’ of undefined & Error when deleting temporary files { Error: ENOENT: no such file or directory, unlink

storage-resize-images extension version 0.1.3 configuration parameters -Deployment location us-central1 -Sizes of resized images 200x200,500x500,1240x1240 -Deletion of original file false -other’s are default unset

I have upload it from sdk firebase": “6.3.0”, “firesql”: “2.0.2”, “linq2fire”: “1.0.22”, “react”: “16.8.3”, “react-native”: “0.59.9”, I try installing extension from both way console and cli none of them work for me

1Screenshot from 2019-12-11 13-21-48

And also its not creating resized file name with attached original file name + height,weight its showing direct _200X200

Screenshot from 2019-12-11 14-24-36

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use HTML5 to resize an image before upload - Stack Overflow
I've thought about moving the file input out of the form and having a hidden input in the form that I set the...
Read more >
Cannot set property 'src' of Null in JavaScript | bobbyhadz
The "Cannot set property 'src' of null" error occurs for 2 reasons: Setting the src property on a null value (image element that...
Read more >
ReportExecution2005 HTMLFragment problem - Microsoft Q&A
Instead the html fragment is triggering javascript error: Uncaught TypeError: Cannot read properties of undefined (reading 'minWidth') ...
Read more >
react-image-file-resizer - npm
React module that can rescaled local images. You can change image's width, height, format, rotation and quality. It returns resized image's ...
Read more >
How To Process Images in Node.js With Sharp - DigitalOcean
This tutorial covers using the Node.js library sharp to read an im… ... Second, you'll chain the format() method to the resized image...
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