bbbenji / synthwave-hass-extras

Extras for the synthwave inspired theme for Home Assistant
https://github.com/bbbenji/synthwave-hass
MIT License
14 stars 5 forks source link

Log flooded with errors #3

Open DavidFW1960 opened 4 years ago

DavidFW1960 commented 4 years ago

https://domain:port/community_plugin/synthwave-hass-extras/synthwave-hass-extras.js:119:52 Uncaught SecurityError: Blocked a frame with origin "https://domain:port" from accessing a cross-origin frame.

Only seeing since update

bbbenji commented 4 years ago

The latest fixes for styling HACS have caused this. See: https://github.com/bbbenji/synthwave-hass-extras/pull/2. However, that error will only show for those with external iFrames. Until I or somebody else figures out a better way to resolve some styling issues, in this case with HACS, there will be compromises. That might be a challenge until something changes in HASS or HACS.

DavidFW1960 commented 4 years ago

Not sure I understand... why is HACS relevant here? So I should just disable this for now?

bbbenji commented 4 years ago

There should be no risk of running this theme with embedded iFrames. However, if the logs are annoying, you may either stop using this theme or remove any embedded iFrames you are using.

flexage commented 4 years ago

@bbbenji i suppose we could disable the injection of the iframe styles if the host for HACS doesn't match the one used by HA? A simple conditional inserted at the right place would easily accomplish this. It won't be applying the custom styles to the HACS iframe anyway if it's Cross-Domain, and this way the error messages wouldn't appear.

bbbenji commented 4 years ago

That sounds like a fine work around @flexage I don't really see any other solution here.

DavidFW1960 commented 4 years ago

This has stopped working again in 0.116.0. I had to remove it but I miss the styling it provided. Have you seen the same problem?