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 'canvas' of undefined

See original GitHub issue

I’m getting a TypeError

html2canvas.js:2264 Uncaught TypeError: Cannot read property 'canvas' of undefined
    at html2canvas (html2canvas.js:2264)
    at demo.html:176

while trying to call

html2canvas(document.body).then(function(canvas) {
    document.body.appendChild(canvas);
});

as described in the documentation

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
niklasvhcommented, Aug 29, 2017

Neither of those are stable yet. Releases can be found under https://github.com/niklasvh/html2canvas/releases or npm

0reactions
niklasvhcommented, Aug 30, 2017

For contributing, the master branch is the way to go as the whole library has been rewritten

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'canvas' of undefined - Stack Overflow
I am getting the following error: Uncaught TypeError: Cannot read property 'canvas' of undefined Does anywhone know how to fix this?
Read more >
cannot read property canvas of undefined · Issue #557 - GitHub
and I added the script for the chart with the options and data as the example of the pie chart. I am getting...
Read more >
Uncaught type error: cannot read property of undefined
I have a problem when updating datapoint in canvas chart. I get this error message: Uncaught TypeError: Cannot read property 'getTime' of ...
Read more >
Uncaught TypeError: Cannot read property 'async' of undefined
I hit the error below when try to load back the object into canvas. Any idea how to fix this? Uncaught TypeError: Cannot...
Read more >
TypeError: Cannot read property 'canvas' of null - Web
Description When a participant tries to share the screen by executing the below code, it throws error :“Cannot read property 'canvas' of ...
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