Open eyunhua opened 1 year ago
👋 @eyunhua
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
This worked in my case - https://github.com/bubkoo/html-to-image/issues/49#issuecomment-762222100
Any update on this problem?
Even with the crossorigin="anonymous"
I am getting these errors:
Error inlining remote css file DOMException: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
Access to fetch at 'https://use.fontawesome.com/releases/v5.0.7/css/all.css' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Error loading remote stylesheet TypeError: Failed to fetch
Update: setting skipFonts
to true
removed all of the error messages and the resulting image still looks the same.
Also getting this error. Seems like skipFonts: true
just hides the problem. The fonts in the screenshot are inaccurate.
Original:
Screenshot:
skipFonts: true,
preferredFontFormat: 'woff2',
backgroundColor: 'white'
This helped me to get rid of all the console errors related to css and scripts from the library
Any news about this bug ? I've seen that a PR was still open, nay plan to merge it ?
Expected Behavior
Html-to-image as part of these functions, they are packaged into sdk. When other projects call sdk, an error is reported as follows:
Current Behavior
Console report an error
Steps To Reproduce
Your Environment