Vendicated / Vencord

The cutest Discord client mod
https://vencord.dev
GNU General Public License v3.0
9.1k stars 1.29k forks source link

[Bug] Custom CSS & Themes do not work on Firefox #548

Closed muznyo closed 1 year ago

muznyo commented 1 year ago

Discord Account

No response

What happens when the bug or crash occurs?

I use a vencord firefox extension and i have issues with it. When putting the css link, it shows:

Error: NetworkError when attempting to fetch resource.

It shows with any BetterDiscord Theme

What is the expected behaviour?

It applies the theme without any problems

How do you recreate this bug or crash?

  1. open discord settings
  2. click on themes in vencord section
  3. put in a css link
  4. the error shows up

Errors

Replace this text with your crash-log.

Request Agreement

lewisakura commented 1 year ago

Firefox CSP issue, nothing to fix here

Vendicated commented 1 year ago

as mentioned by lewi, Firefox has a bug that makes it not correctly apply our networking rules which makes it impossible for Vencord to load custom themes. This is an issue with Firefox and needs to be fixed by Firefox, not us

Solutions:

Vendicated commented 1 year ago

Okay I just found out the reason is because Firefox manifest v3 implementation is just super bad and they didn't implement many apis auch as the declarativeNetRequest api that Vencord depends on (https://bugzilla.mozilla.org/show_bug.cgi?id=1687755). So we just need to add back legacy request interception

muznyo commented 1 year ago

Okay I just found out the reason is because Firefox manifest v3 implementation is just super bad and they didn't implement many apis auch as the declarativeNetRequest api that Vencord depends on (https://bugzilla.mozilla.org/show_bug.cgi?id=1687755). So we just need to add back legacy request interception

interesting

so it will be able to work again?

Vendicated commented 1 year ago

I tried fixing it in https://github.com/Vendicated/Vencord/pull/554 but it simply doesn't work because reasons:tm: and I will not put any more effort into trying to write ugly workarounds for problems that shouldn't exist

So unless someone else fixes it, it will likely stay broken

muznyo commented 1 year ago

The workaround i used is that i installed this extension and copied css theme in there

NSPC911 commented 1 year ago

I would just recommend getting Tampermonkey and downloading the userscripts. I don't have any problems with it, so it should be fine. I don't know about other userscript managers like greasemonkey, violentmonkey and firemonkey, but it may have problems

Vendicated commented 1 year ago

Fixed in https://github.com/Vendicated/Vencord/commit/5305447f442b57443c4616ccd8d530c2c5e539b4!!

Keeping this open until the update reaches the firefox store

Vendicated commented 1 year ago

Fix landed in 1.1.9!

muznyo commented 1 year ago

Still doesn't work, has same error message like before

Vendicated commented 1 year ago

Still doesn't work, has same error message like before

Update the extension to the latest version.

muznyo commented 1 year ago

Still doesn't work, has same error message like before

Update the extension to the latest version.

It's 1.1.9, right?

If yes, i already have it

Vendicated commented 1 year ago

please use our support channel then

muznyo commented 1 year ago

Nevermind, it works now after a few reopenings