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.

Uncaught TypeError: Cannot read property 'setImage' of undefined

See original GitHub issue

I have defined my canvas like this:

<canvas width="560" height="{{ articlesEditImagesCtrl.imageHeight }}" id="canvas" image-cropper image="articlesEditImagesCtrl.cropper.sourceImage" cropped-image="articlesEditImagesCtrl.cropper.croppedImage" crop-width="400" crop-height="200" touch-radius="30" crop-area-bounds="articlesEditImagesCtrl.bounds" cors></canvas>

The cropper is opened on modal window -> Angular UI. The first time I opened the modal, everything is working, but the second time, I get the error:

Uncaught TypeError: Cannot read property 'setImage' of undefined

Is there any way to initialise cropper properly every time ?

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jofftiquezcommented, Oct 28, 2015

@Olgagr Same problem here, but when I switched to the unminified version it worked. Hope the idea helps.

0reactions
mgorenbergcommented, Jun 13, 2017

As a related aside, it would be very helpful if the non-minified js file would be added to the bower repository, so that it could be used through that package manager.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'image' of null - javascript - Stack Overflow
when i use middleware.js to headlining not inserting image it give me this error when user not upload image file and return TypeError:...
Read more >
Uncaught TypeError: Cannot read property 'title' of undefined
Hello, I am unable to initiate a lightbox when clicking on an image. When I click on an image, nothing fires on the...
Read more >
Fix Cannot Set Property of Null Error in JavaScript - YouTube
Check us out at https://www.skillforge.com The " cannot set property of null " error is a very common JavaScript issue that you may...
Read more >
TypeError: Cannot read property '_img' of undefined #258
I am attempting to resize images during nuxt.generate by calling context.$img from a server plugin. The plugin is intentionally naïve and ...
Read more >
Cannot read property 'isNullOrUndefined' of undefined from sp ...
Adding the below scripts to the page fixed the issue. <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script> <script ...
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