3

I've built a Chrome Extension, that injects HTML elements into the existing website DOM based on different urls inside the website.

When using AdBlockers, VPNs or Multi-Login browsers, the CSS sometimes doesn't get injected so the elements (divs with class) that the extension injects appear without any styling.
It happens rarely and difficult to reproduce consistently.

I am looking for different leads I can investigate to understand why an extension CSS might not inject to the page or load properly. and some users have reported that the CSS of my extension is all messed up.

I have this in my manifest:

  "content_scripts": [
    {
      "matches": [
        "https://website.com/*"
      ],
      "js": [
        "build/content.js"
      ],
      "css": [
        "build/content.css"
      ]
    }
  ],

content.css is the webpck output of style.scss.

I also have this at the top of content.js:

import './css/style.scss';

Is there any reason why using a VPN (like openVPN) would interfere with the loading of a Google Chrome extension CSS?

amiregelz
  • 1,833
  • 7
  • 25
  • 46
  • Could you provide a link to your extension? – ax. Mar 15 '23 at 20:40
  • @ax. I can't, it's an internal extension for a closed system – amiregelz Mar 16 '23 at 10:08
  • Could you provide some networking info, on your browser, or tcpdump on your server. – ofirule Mar 16 '23 at 13:29
  • Could you at least provide an MCVE? [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Thomas Mueller Mar 17 '23 at 12:34
  • 1
    @ThomasMueller I doubt it will help - it's a very standard Chrome Extension, that injects HTML elements into the existing website DOM. When using AdBlockers, VPNs or Multi-Login browsers, the CSS sometimes doesn't get injected so the elements that the extension injects are without any styling. It happens rarely and difficult to reproduce consistently. I am looking for different leads I can investigate to understand why an extension CSS might not inject to the page or load properly. – amiregelz Mar 17 '23 at 18:27
  • The answer will likely be in the client browser console. It's guess work otherwise, but the likely answer is one of those items are blocking the source your CSS file is at or blocking the source of one of the files it is referencing. – DubStep Mar 22 '23 at 14:26

0 Answers0