Html2canvas: TypeError: Cannot read the property 'stack' of null - v0.5.0-alpha1

Created on 22 Apr 2015  ·  3Comments  ·  Source: niklasvh/html2canvas

I was using html2canvas v0.4.1 but I updated to v0.5.0-alpha1 to trying to solved an issue on IE11. (basically the canvas was cut off on IE11, works fine on Chrome and FF).

But know I get the following error (in any browser):

screen shot 2015-04-22 at 2 22 02 pm

_Uncaught (in promise) TypeError: Cannot read property 'stack' of null {stack: (...), message: "Cannot read property 'stack' of null"}message: "Cannot read property 'stack' of null"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }proto: Error(anonymous function) @ html2canvas.js:2092NodeParser.createStackingContexts @ html2canvas.js:2086(anonymous function) @ html2canvas.js:1932(anonymous function) @ html2canvas.js:2697_

The error in on the line html2canvas.js:2092

container.assignStack(container.parent.stack);

Any thoughts?
Thanks!

Most helpful comment

Got the same problem - got a globally defined function named "Node". I don't see why this issue is closed, as a library's internally used class names should not conflict with application they're used in.

All 3 comments

Hi,

I'm using on the same project a game framework called 'Enchant.js'. I
noticed that framework renames a class called 'Node' ('Node' is the named
of a class used by the library html2canvas v0.5.0 and higher). To fix this
issue I've renamed the class 'Node' on enchant.js to avoid override this
class.

Checked if you have another 3-party libraries on your project, and see if
they used a class called 'Node' (or maybe is overriding another class).

Hope this helps!

2015-05-09 8:12 GMT-06:00 Xinyu Zhang [email protected]:

I encounter the same issue, how do you fix it?


Reply to this email directly or view it on GitHub
https://github.com/niklasvh/html2canvas/issues/575#issuecomment-100494211
.

@wbarrantes Hey!!! Thank you very much !!

Got the same problem - got a globally defined function named "Node". I don't see why this issue is closed, as a library's internally used class names should not conflict with application they're used in.

Was this page helpful?
0 / 5 - 0 ratings