uBlock icon indicating copy to clipboard operation
uBlock copied to clipboard

Network filtering not working in latest Firefox Nightly (webext)

Open HopefullyNotTaken opened this issue 9 years ago • 37 comments

Describe the issue

With the latest Firefox Nightly, network filters are no longer being applied. Cosmetic filtering, however, appears to be working just fine.

Steps for anyone to reproduce the issue

  1. Download the latest version of Firefox Nightly.

  2. Create a new profile.

  3. Install any version of uBlock Origin. Make sure it's the webext.

  4. Go to any site and create a rule to block a resource using the network filter ( || ).

  5. Open the Network Monitor on said site and reload. Notice how the resource still shows up in the Network Monitor and visually despite there being a rule in uBlock Origin to block it.

Your settings

Tried on a clean profile so all settings are at default.

  • OS/version: Arch Linux
  • Browser/version: 55.0a1 (2017-06-05) (64-bit)
  • uBlock Origin version: 1.12.5rc1 but tried older versions as well ( 1.12.5rc0, 1.12.4, 1.12.2, 1.12.1, 1.12.0, 1.11.4, 1.11.2, 1.11.0, 1.10.6)
Your filter lists

Default.

Your custom filters (if any)

None.

HopefullyNotTaken avatar Jun 06 '17 13:06 HopefullyNotTaken

latest Firefox Nightly

Why report the issue here? If using latest Nightly causes uBO to stop working, then in all likelihood isn't the issue with Nightly?

gorhill avatar Jun 06 '17 13:06 gorhill

If I comment out the code adding ws://*/* and wss://*/* to onBeforeRequest.addListener, it seems to "fix" the issue.

This use to cause a warning at the console at most without causing uBO to stop functioning. So something changed in Nightly to cause uBO's onBeforeRequest listener to be completely ignored if declaring ws;/wss: URL patterns.

Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1367478.

gorhill avatar Jun 06 '17 14:06 gorhill

For the time being, I'm going to stop building the webext version of uBO, there are too many serious issues now with it. I will resume when things stabilize, it's unclear whether it is expected things will have to change in uBO or whether things will be fixed in webext.

gorhill avatar Jun 06 '17 14:06 gorhill

Thank you for the explanation and quick workaround :) @gorhill

shellye5 avatar Jun 06 '17 15:06 shellye5

I just recevied a Nightly update which appears to solve the issue reported here. However the issue with uBO's auxiliary pages is not solved, and this quite cripples the webext version of uBO, so for now the webext version won't be released anymore until things improve, as I just do not have the time to deal with all reports and there is no quick fix. Whoever really want the webext version badly despite the problems can just git clone and build it themselves.

gorhill avatar Jun 06 '17 15:06 gorhill

Is there an issue for the auxiliary pages? Sorry, not sure what that is.

andymckay avatar Jun 06 '17 22:06 andymckay

Problem which appeared lately, discussed here: https://bugzilla.mozilla.org/show_bug.cgi?id=1368152#c15.

I use "auxiliary pages" to refer to the dashboard, logger principally, but also others such as the warning when a document is blocked, advanced settings, asset viewer, or even the popup panel-in-a-tab. With legacy version, these would be like:

  • chrome://ublock0/content/dashboard.html
  • chrome://ublock0/content/logger-ui.html
  • chrome://ublock0/content/advanced-settings.html
  • chrome://ublock0/content/asset-viewer.html?url=easyprivacy

Etc.

gorhill avatar Jun 06 '17 22:06 gorhill

Thanks.

andymckay avatar Jun 06 '17 23:06 andymckay

I brought back the hybrid-webext build, since it works as expected with Firefox 54.

gorhill avatar Jun 24 '17 21:06 gorhill

webext version still uses high disk , and slows down startup seems like this bug is affecting it too. @gorhill can you look into it? because the performance is low

https://bugzilla.mozilla.org/show_bug.cgi?id=1371255

extensions.webextensions.remote layers.popups.compositing.enabled

Breaks webext sometimes(does not block ad's and restarting fixes it)

shellye5 avatar Jun 25 '17 11:06 shellye5

@andymckay Any thoughts on whether I should just go ahead and push the webext-hybrid version of uBO to the dev channel on AMO?

gorhill avatar Jul 08 '17 16:07 gorhill

Sorry, I'm not sure what your requirements are for that and I'm a bit biased on this point, so you probably wouldn't want to take my advice.

andymckay avatar Jul 11 '17 23:07 andymckay

Just a PSA to stop pushing beta update 1.13.11rc0.webext to users as it might break their settings

[test setup=32bit lin/win10 Asus X552EA-SX009D Laptop (APU Dual Core- 2GB ram) with FF57]

the webext in beta 1.13.11rc0 on AMO breaks filters/settings if user has a custom list added

ERRORS:

Failed to serialize browser.storage key "cache/https://www.kiboke-studio.hr/i-dont-care-about-cookies/abp/": TypeError: JSON.serialize is not a function ExtensionStorage.jsm:60

Failed to serialize browser.storage key "cache/disconnect-malware": TypeError: JSON.serialize is not a function ExtensionStorage.jsm:60

settings and storage files

https://1drv.ms/f/s!AuafaQl91miScMPu2qlVOpMJ8yc

Prefer storage file as it is easily reproducible

Import the attached settings, update lists and check storage size(will be in MBs) now restart and just add any filter list and restart -purge-update and storage size is 1kb and settings/lists broken, delete the added filter apply and works again but with restart before deleting the added filter causes the same problem again(Basically cannot use other filters )

try adding

https://www.kiboke-studio.hr/i-dont-care-about-cookies/abp/

or any other

https://github.com/collinbarrett/FilterLists

The NON-WEBEXT works fine in Palemoon/ESR

@gorhill can you please add ADGuard's Filter-lists(english/privacy/annoyance/etc) as many of US prefer theirs over more popular ones please.

shellye5 avatar Aug 27 '17 05:08 shellye5

That error is not uBO's code, report to bugzilla please.

gorhill avatar Aug 27 '17 09:08 gorhill

@gorhill against what should the bug be filed?

So till it's fired the webext uBo will be broken?

shellye5 avatar Aug 27 '17 11:08 shellye5

It's not broken for me. The error:

TypeError: JSON.serialize is not a function ExtensionStorage.jsm:60

Is Firefox's code. I don't get this error, using Nightly 57.0a1 (2017-08-26) (64-bit)/Linux.

Edit: Nightly updated to 57.0a1 (2017-08-27), and all still work fine.

gorhill avatar Aug 27 '17 12:08 gorhill

@gorhill I mentioned that using 32bit builds will test in today's build but can only do in windows10 machine today,

shellye5 avatar Aug 27 '17 12:08 shellye5

What is easier to test is for you to un-check all the following lists:

  • EasyList
  • EasyList without element hiding rules
  • EasyPrivacy
  • Fanboy’s Enhanced Tracking List
  • Fanboy’s Annoyance List
  • Fanboy’s Social Blocking List

These are all parts of Fanboy Ultimate, no point enabling them when you have Fanboy Ultimate enabled. Even if uBO discards duplicates, it still has to parse/load to find out what is duplicate, and loading all these redundants lists is not cheap CPU- and memory-wise. See if this makes your issue go away.

gorhill avatar Aug 27 '17 12:08 gorhill

@gorhill okay doing a clean install again and just setting up with a few, what else can be helpful to you for debug?

shellye5 avatar Aug 27 '17 12:08 shellye5

No need to clean install, I just wanted to see if un-checking the above lists solved your issue. If yes, this would have confirmed your issue is related to storage size.

gorhill avatar Aug 27 '17 12:08 gorhill