livestyle / issues

Report all your LivesStyle issues here
24 stars 1 forks source link

Error in console #159

Open Robert-IMT opened 6 years ago

Robert-IMT commented 6 years ago

Error in event handler for runtime.onMessage: SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at findStyleSheets (chrome-extension://diebikgmpmeppiilkaijjbdgciafajmg/scripts/content-script.js:1014:12)

simoneolivieri commented 6 years ago

i'm finding the same error... screen 2018-02-08 alle 11 20 25 chrome version 64.0.3282.140 (Build ufficiale) (a 64 bit)

danielgreg commented 6 years ago

Same here:

Error in event handler for runtime.onMessage: SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at findStyleSheets (chrome-extension://diebikgmpmeppiilkaijjbdgciafajmg/scripts/content-script.js:1014:12) at chrome-extension://diebikgmpmeppiilkaijjbdgciafajmg/scripts/content-script.js:1052:13

Chrome Version 64.0.3282.186 (Official Build) (64-bit)

kubamarkiewicz commented 6 years ago

+1

Robert-IMT commented 6 years ago

The author replied as follows: "project support is suspended for an indefinite period." So that...

simoneolivieri commented 6 years ago

very nice :-(

Robert-IMT commented 6 years ago

...i solved this problem by removing the operating system updates for 2018.

simoneolivieri commented 6 years ago

i solved removing livestyle ...

Zet-Web commented 6 years ago

+++ Сергей, что случилось с плагином? после обновления что то перестал работать( Откатывать версию хрома или как быть ? Дайте совет что ли, без вашего плагина уже тяжело как либо делать задачки , которые экономили уйму времени!

sergeche commented 6 years ago

This issue is caused by recent Chrome update: it blocks access to some CSS files. Don’t know if it can be solved easily. Does extension works with opened DevTools?

Zet-Web commented 6 years ago

Нет Сергей, оно сейчас вообще не работает увы( около часа пытаюсь настроить и так и эдак, никак не включается

Zet-Web commented 6 years ago

Если devtools открываешь, пишет что расширение только обновилось, закрой и откройте devtools, чтобы обновить расширение. Потом если даже и включается, то не видит никакие css(sass и прочие) файлы....
image

Zet-Web commented 6 years ago

@Robert-IMT Any ideas to solve this problem? How can i fix it? Or any similar extension or way to edit sass live from devtools and save it in ST3 or other editor? Can anybody help me ? Give me advice?

lupokemontes commented 6 years ago

+1

kubamarkiewicz commented 6 years ago

@Zet-Web Maybe this will help you: looks like it is possible to save changes from Chrome DevTools without using any plugin, here is how: https://developers.google.com/web/tools/setup/setup-workflow It tried and it works well both ways: changes in source files are visible in chrome without refresh. They also say that it works with CSS processors (https://developers.google.com/web/tools/setup/setup-preprocessors) however I didn't try ...

Zet-Web commented 6 years ago

@kubamarkiewicz Hi, thanks a lot. I tried it , but in new version of chrome i can't see it ... so i think it's not working now. It's my screenshot from my devtools. All flags are enabled, i think so. When i tried it this feature working not stable ( Livestyle so too, many bugs , but i Used and adapted for this extension.

image So i think they are disabled it (

image

image

tsymbal commented 6 years ago

Работа встала из-за этой ошибки. Как же быстро мы подсели на livestyle. Сергей, поделитесь инфой, стОит ли ожидать исправления данной ошибки в ближайшее время? Почем и на какой счёт мы должны скинуться, чтобы вы возобновили поддержку этого плагина? 😁 Сделайте его платным. Мы - разрабы - несём убытки, и должны платить за удобства. Многие из нас согласятся заплатить за ваш незаменимый плагин. Пожааалуйста 😻😻😻, вернитесь!!!

joshfitzgerald commented 6 years ago

Having the same error here. Please help with a fix. The LiveStyle tool is so much better than LiveReload. I don't want to switch over.

Error in event handler for runtime.onMessage: SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules at findStyleSheets (chrome-extension://diebikgmpmeppiilkaijjbdgciafajmg/scripts/content-script.js:1014:12)

kubamarkiewicz commented 6 years ago

@Zet-Web sorry, I don't know how to help you. I am using new version of chrome and it works very well with CSS files, but I didn't try it with SASS ...

sergeche commented 6 years ago

I made a quick research of this problem. It was caused by recent Chrome update which taints stylesheets with CORS: https://chromium.googlesource.com/chromium/src/+/a4ebe08c91e29140e700c7bae9b94f27a786d1ca

Unfortunately, I was unable to fix it, even by rewriting requests on-the-fly with Chrome API. It also means that this change is breaking for LiveStyle which uses CSSOM to build a list of available stylesheets and patch them with incoming updates from editor.

If there’s no solution to allow extension’s content script access to CSSOM, it will require a full LiveStyle extension rewrite and make it less intuitive (for example, it may require to open DevTools to make LiveStyle work)

tsymbal commented 6 years ago

Sergey, this means that we will no longer be able to use livestyle ... So sad.

I was thinking about possible ways out.

  1. Go back to Chrome v63 and never update again.
  2. Use Overrides. This is not so convenient, but, nevertheless, the most similar solution. https://developers.google.com/web/updates/2018/01/devtools#overrides

Thank you very much, Sergey. Years spent with Livestyle were the most productive. You made an excellent app. It's sad that everything ends.

Сергей, вы крутой! Спасибо за LiveStyle.

tsymbal commented 6 years ago

By the way, on some sites livestyle continues to work fine. And it does not depend on the CMS on which the site operates. I checked 2 sites on bitrix - on one everything is ok, on the other - an error. Maybe it's in the server settings?

The situation does not change even if DevTools is open.

(Не хочу так просто расставаться с Livestyle)

sergeche commented 6 years ago

Yes, it might be resolved on server side with CORS headers. Try to use crossorigin="anonymous" in <link> tags and make sure server responds with proper Access-Control-Allow-Origin header

DuudeXX8 commented 6 years ago

@sergeche Да ваш вариант помог мне правда я не использовал данный плагин проста столкнулся с этой проблемой и решил с вашей помощью

janstieler commented 6 years ago

Hi, how can I get a proper Access-Control-Allow-Origin header from my apache? If I write

<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
</IfModule>

in my .htaccess. I get the error message further. Or does I need another URL instead of the *

danielgreg commented 6 years ago

Hi! Don't know if this is okay to do, remove this comment if it isn't. It fixes the chrome error. Edit the file scripts/content-script.js at line 1016 and wrap this block in a try-catch:

if (item.cssRules) { for (var j = 0, jl = item.cssRules.length; j < jl; j++) { if (item.cssRules[j].type == 3) { findStyleSheets([item.cssRules[j].styleSheet], out); } } }

You'll have to remove the original extension and add this one manually instead.

Cheers!

doublecream commented 6 years ago

@danielgreg - Hi. Could you share the try-catch you set up? Cheers, S :)

doublecream commented 4 years ago

Yes, it might be resolved on server side with CORS headers. Try to use crossorigin="anonymous" in <link> tags and make sure server responds with proper Access-Control-Allow-Origin header

Thank you! This worked for me... livestyle bi-directional functioning with google fonts :)

mikesocorecc commented 4 years ago

resolví eliminar livestyle ...

me funciono al hacer lo mismo, gracias!!!!