Closed KagamiChan closed 4 years ago
Im getting the same problem
getting the same error
Uncaught (in promise) TypeError: Cannot assign to read only property 'className' of object '#
getting the same problem
TypeError: Cannot assign to read only property 'className' of object '#
I updated html2canvas to latest version 1.0.0-rc3 and started seeing this issue.
Console Error: core.js:1673 ERROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'className' of object '[object SVGSVGElement]' TypeError: Cannot assign to read only property 'className' of object '[object SVGSVGElement]' at DocumentCloner.resolvePseudoContent (html2canvas.js:5304) at DocumentCloner.cloneNode (html2canvas.js:5200) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at DocumentCloner.cloneNode (html2canvas.js:5207) at resolvePromise (zone.js:831) at resolvePromise (zone.js:788) at zone.js:892 at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423) at Object.onInvokeTask (core.js:3811) at ZoneDelegate.push.../../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422) at Zone.push.../../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195) at drainMicroTaskQueue (zone.js:601) at push.../../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:502) at ZoneTask.invoke (zone.js:487)
Hello guys, 1.0.0-alpha.12
works just fine
Hello guys,
1.0.0-alpha.12
works just fine
Thanks. It worked for me.
Same problem here
I caught this error with the text: Torten dekorieren mit Fondant - 6 süße Inspirationen
Probably it's related to this word -> süße, got fixed once I removed it
Latest non-min doesn't work for me regarding same issue. 1.0.0-alpha.12 didn't help either.
Update: Removing references to modernizr allowed me to get latest html2canvas to work. Cheers.
This issue occurs for me when there is a <rect>
element. I've linked a possible fix I'm trying.
I'm having the same problem. I tried 1.0.0-alpha.12 and v1.0.0-rc.3
Did not work for me, any solutions will be appreciated
I'm also receiving the same error. Only seems to occur with rc.2 and rc.3 releases. I want to update to rc.3 to fix an issue with font-family not displaying correctly, but then exporting svgs breaks with certain elements. I've reverted to rc.1. Running Chrome on Mac.
As it was beta and alpha, I took their js file and included it in my angular project. + before calling the html2canvas method I ran this method out side the ngZone. Kind of fixed the issue, U can try as well u can change the code as per your need
I'm also receiving the same error. Only seems to occur with rc.2 and rc.3 releases. I want to update to rc.3 to fix an issue with font-family not displaying correctly, but then exporting svgs breaks with certain elements. I've reverted to rc.1. Running Chrome on Mac.
I confirm that reverting to rc.1 fixed it for me as well, tested with Chrome on win10.
Hello guys, 1.0.0-alpha.12 works just fine. There is Issue in 1.0.0-rc.0 to 1.0.0-rc.3. Then don't go for Latest version.
Well, i dont have any SVG that is used in canvas, however i'm getting this error... (this behaviour is on chrome, it works on FF). - 1.0.0-rc.3
This is still an issue on: 1.0.0-rc.5. Any chance of getting it fixed?
Hey!
I switched to htmltoImage as this reo doesn't look like will be updated or fixed. Not it will come out of RC version
On Thu, 3 Oct 2019, 2:23 pm Nicu Spinu, notifications@github.com wrote:
This is still an issue on: 1.0.0-rc.5. Any chance of getting it fixed?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/niklasvh/html2canvas/issues/1868?email_source=notifications&email_token=ABIHC5PIQDVTRNMXBDMQKE3QMWXJFA5CNFSM4HR732BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAHPX2A#issuecomment-537852904, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIHC5LJUK6VAE4NLU3NCT3QMWXJFANCNFSM4HR732BA .
Hey!
I had the same problem in a React app.
I had some FontAwesomeIcon on my page, removing them fixed the problem.
(even if the font icons were not in the selected element that I wanted to canvas)
I have created a pull request that fix this error.
Any news about the PR?
I have the same issue with html2canvas: 1.0.0-rc.5"
in chrome Version 78.0.3904.108 (Official Build) (64-bit)
html2canvas.js?c0e9:5333 Uncaught (in promise) TypeError: Cannot assign to read only property 'className' of object '#<SVGSVGElement>'
at DocumentCloner.resolvePseudoContent (html2canvas.js?c0e9:5333)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5228)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
at DocumentCloner.cloneNode (html2canvas.js?c0e9:5235)
use dom-to-image API For JS,Angular Which is better than this.
@maxaqquepucho It's because the fix is not shipped
@niklasvh could you help create a new release?
@niklasvh, will you please release v1.0.0-rc.6 with this fix? What do you need to make this happen soon?
@niklasvh, the community using this library expects more frequent updates than you are providing. (>3 months of inactivity) If you are unable to maintain this library on your own, please add some prominent contributors such as @andyedinborough and @cobexer as collaborators: https://github.com/niklasvh/html2canvas/settings/access. Maybe they can provide the maintenance and releases that this library needs. Thank you.
@niklasvh This guy has been cloned the repo of the package, modify it, and he deployed it here: https://www.npmjs.com/package/@trainiac/html2canvas
Thank you @niklasvh <3
Thank you @mhmdtshref Moving to https://www.npmjs.com/package/@trainiac/html2canvas works fine and solves this problem. @niklasvh seems to refuse or is unwilling to fix this package.
@niklasvh Sir please note that this issue is still raising for version ^1.0.0-rc.5 please open this issue or resolve it by your side Env... React @16+ Google Chrome Cause of issue : while rendering dom use case :
`printDocument(e){
e.preventDefault();
const input = document.getElementById('releaseDiv');
html2canvas(input)
.then((canvas) => {
.........
});
}
// init this.printDocument.bind(this);
`
I ran into the same issue and can confirm the fix in the latest master branch works for me. Hopefully 1.0.0-rc.6
can be released soon, in the meanwhile I published my fork on npm containing the fix to unblock myself. If anyone is interested, use yarn add @lzhoucs/html2canvas
to install, and import html2canvas from "@lzhoucs/html2canvas";
to import.
Please make sure you are testing with the latest release of html2canvas. Old versions are not supported and issues reported for them will be closed.
Please follow the general troubleshooting steps first:
Bug reports:
Setting className for SVG element will raise error, here's some stack trace, I'm using the non minified js version. I thinks the reason is probably I'm using fontawesome 5 SVG icon
Specifications: