Error DOMException: Failed to execute 'setEnd' on 'Range': The offset 45 is larger than the node's length (44).
See original GitHub issue- html2canvas version tested with: 1.0.0-alpha.4
- Browser & version: Google Chrome 63.0.3239.84 64-bit
- Operating system: Windows 10
Error DOMException: Failed to execute 'setEnd' on 'Range': The offset 45 is larger than the node's length (44).
at getRangeBounds (http://my-local-site.test/libraries/html2canvas/dist/html2canvas.js?v=1.0.0-alpha.4:2310:11)
at parseTextBounds (http://my-local-site.test/libraries/html2canvas/dist/html2canvas.js?v=1.0.0-alpha.4:2278:54)
at Function.fromTextNode (http://my-local-site.test/libraries/html2canvas/dist/html2canvas.js?v=1.0.0-alpha.4:1640:84)
at parseNodeTree (http://my-local-site.test/libraries/html2canvas/dist/html2canvas.js?v=1.0.0-alpha.4:2887:64)
at parseNodeTree (http://my-local-site.test/libraries/html2canvas/dist/html2canvas.js?v=1.0.0-alpha.4:2918:29)
Happens when trying to run the h2c function, prevents the canvas from being created.
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Error DOMException: Failed to execute 'setEnd' on 'Range'
Error DOMException : Failed to execute 'setEnd' on 'Range': The offset 45 is larger than the node's length (44).
Read more >Uncaught DOMException: Failed to execute 'setStart' on 'Range'
Uncaught DOMException: Failed to execute 'setStart' on 'Range': The offset some integer is larger than the node's length ( some smaller integer ) ......
Read more >Wheel Offset - Tyre Size Calculator
Wheel offset is what locates the tyre and wheel/rim assembly in relation to the suspension. it's the measured distance between the mounting pad...
Read more >#12152 (Failed to execute 'setStart' on 'Range': The offset 2 is ...
Uncaught IndexSizeError: Failed to execute 'setStart' on 'Range': The offset 111 is larger than or equal to the node's length (23). ckeditor.js:405 ...
Read more >rangy-core.js - Paris Cocktail
UNDEFINED; 44 } 45 46 // Creates a convenience function to save verbose repeated ... 220 221 throw new Error("Module '" + this.name...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The special character
ß
will be rendered asSS
if you have atext-transform: uppercase;
and this will trick html2canvas. I solved it by replacingß
bySS
in the markup, when I knew the text would be rendered in uppercase.I found the root cause of this error, if any special character like (‘ß’) present in your text and its Unicode html conversion is ‘ss’ that’s increase the length of offset. Please update the library Thanks.