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.

CSSStyleSheet Error

See original GitHub issue

I get an error when I trying to convert google maps to image:

Error inlining remote css file SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
embedWebFonts.js:118 Error loading remote stylesheet SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules
embedWebFonts.js:137 Error while reading CSS rules from https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans:400,500,700 SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules

In result, I got an image, but with bad size (bigger than my screen)

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
simplecommercecommented, Jan 18, 2021

Guys, I tried this based on another issue here that I read, I put crossorigin=“anonymous” in the tag and it works for me.

Example:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500|Montserrat:300,400,500" crossorigin="anonymous">
0reactions
vivcat[bot]commented, Apr 11, 2022

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the “Failed to Read the CSSRules Property From ...
How to Fix the “Failed to Read the CSSRules Property From CSSStyleSheet” Error. Avoid this issue when working with style sheets in your...
Read more >
How to Fix the Error: "The package could not be installed. The ...
The missing style.css stylesheet error stems from a faulty theme file, and it only appears when you try to upload a file within...
Read more >
CSSStyleSheet - Web APIs | MDN
Chrome Edge CSSStyleSheet Full support. Chrome1. Toggle history Full support. Edge12... CSSStyleSheet() constructor Full support. Chrome73. Toggle history Full support. Edge79... addRule(). Deprecated Full support. Chrome1....
Read more >
Missing the style.css stylesheet error
Missing the style.css stylesheet error. 2377 views 0. Before reading this help file you may want to check this video. It explains how...
Read more >
Failed to execute 'addRule' on 'CSSStyleSheet': Cannot ...
The line of JavaScript code that is giving the error: styleSheet.addRule(".new-plunder-form-username:focus {border: 1.5 ...
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