web-to-plex icon indicating copy to clipboard operation
web-to-plex copied to clipboard

Issue: Website layout is broken in Chrome by this extension

Open Magikarplvl4 opened this issue 5 years ago • 16 comments

If experiencing this issue still, please do the following →

29 MAR 2020 09:40 PM — To fix, enable Developer mode in Web to Plex's Advanced settings

Describe the error

~~Its look like sites that aren't the Web to Plex website getting broken by the last version of this plugin. if a unstall the plugin everything is fine.~~

Edit: It looks like sites that aren't Web to Plex are broken by the latest version. If I uninstall the extension, everything works fine.

To Reproduce

  1. Go to a website (for example GitHub)
  2. See error

Estimated location

~~Uncaught SyntaxError: Unexpected token '<' VM72:18 ~~ 0P

Screenshots

image image

Extension Information

  • Version: 4.1.2.4
  • Source: store
  • Browser: chrome

Magikarplvl4 avatar Feb 22 '20 19:02 Magikarplvl4

Hi. Not able to reproduce this error. Could you take a look at your console with Developer Mode enabled please?

Domain not acknowledged "github.com" image

Ephellon avatar Feb 22 '20 23:02 Ephellon

image

Ephellon avatar Feb 22 '20 23:02 Ephellon

image

Ephellon avatar Feb 23 '20 00:02 Ephellon

I'm not sure if this is a language error (maybe it runs on sites not in English?). Normally, there would be an injected stylesheet from the extension →

Can't find injected stylesheet (Tweakers → https://tweakers.net) image


Found injected stylesheet (Web to Plex → https://webtoplex.github.io) image

Ephellon avatar Feb 23 '20 00:02 Ephellon

The unexpected token error VM72:18 can be from anything running eval.

Assuming error is in 0P — it's the only script that embeds CSS

Ephellon avatar Feb 23 '20 05:02 Ephellon

Hi @PotatoQuality, could you take a look at my comment?

Ephellon avatar Feb 27 '20 20:02 Ephellon

Hi @Ephellon, issues as being fixed after reinstalling the plugin. Thanks for your quick help <3

Magikarplvl4 avatar Mar 01 '20 19:03 Magikarplvl4

Not sure how this keeps happening...

Ephellon avatar Mar 30 '20 02:03 Ephellon

Notes to self:

  1. plugn.js runs normally, though it still injects on sites not run (most likely the culprit)
  2. All CSS files require the web-to-plex class to be present in some form or fashion...
  3. All domains not accepted kill quietly (as intended)

Ephellon avatar Mar 30 '20 02:03 Ephellon

ok that is really weird. As soon as I turn on developer mode and refresh the IMDB page the format is fine. I'm gonna do it without refreshing the page.

Originally posted by @sp00kie in #168.605748176

It seems Developer mode fixes the issue, but no idea why... Will investigate

Ephellon avatar Mar 30 '20 02:03 Ephellon

Possibly remote styling, though it still doesn't recreate the problem for me...

Ephellon avatar Mar 30 '20 02:03 Ephellon

Fixed. Problem was in plugn.js as suspected. Remote calls were not filtered and inserted HTML

Ephellon avatar Mar 30 '20 03:03 Ephellon

Reopening so that I can pin the issue for other users to see

Ephellon avatar Mar 30 '20 03:03 Ephellon

All websites are broken unless i uninstall or don't allow addin to access that website.

Why does it need access to all websites anyway? it should only need the ones it works with.

I really liked the old 3.4 version, so much simpler.

Simpuhl avatar Apr 29 '20 04:04 Simpuhl

FAQs — Why does the extension want access to all sites?

This permission is used to communicate with HTTPS served pages. In latent terms, if you want to use https://localhost:32400 (Plex), the extension needs permission to communicate with https://localhost. By accessing all URLs, sites can be added much easier, without having to send multiple prompts for access to the same site (i.e. HTTPS v. HTTP served pages).

Ephellon avatar Apr 29 '20 14:04 Ephellon

Uncaught SyntaxError: Unexpected token '<'

6 Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://webtoplex.github.io/font/Plex.woff2' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://webtoplex.github.io/font/Plex.woff' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://webtoplex.github.io/font/Plex.bold.woff2' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://webtoplex.github.io/font/Plex.bold.woff' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://github.com/font/Glyphicons.woff' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

165:1 Refused to load the font 'https://webtoplex.github.io/font/Glyphicons.woff' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".

image

image

Still really crazy without that dev mode. (you wrote about it only here: https://github.com/webtoplex/browser-extension/issues/5#issuecomment-626244779 ; it should probably be on by default while this version is so unstable)

Luckz avatar Oct 28 '20 07:10 Luckz