-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Network filtering not working in latest Firefox Nightly (webext) #2684
Comments
Why report the issue here? If using latest Nightly causes uBO to stop working, then in all likelihood isn't the issue with Nightly? |
If I comment out the code adding 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 Related: https://bugzilla.mozilla.org/show_bug.cgi?id=1367478. |
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. |
Thank you for the explanation and quick workaround :) @gorhill |
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. |
Is there an issue for the auxiliary pages? Sorry, not sure what that is. |
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:
Etc. |
Thanks. |
I brought back the hybrid-webext build, since it works as expected with Firefox 54. |
webext version still uses high disk , and slows down startup https://bugzilla.mozilla.org/show_bug.cgi?id=1371255 extensions.webextensions.remote Breaks webext sometimes(does not block ad's and restarting fixes it) |
@andymckay Any thoughts on whether I should just go ahead and push the webext-hybrid version of uBO to the dev channel on AMO? |
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. |
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 ERRORS:
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) 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. |
That error is not uBO's code, report to bugzilla please. |
@gorhill against what should the bug be filed? So till it's fired the webext uBo will be broken? |
It's not broken for me. The error:
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 I mentioned that using 32bit builds will test in today's build but can only do in windows10 machine today, |
What is easier to test is for you to un-check all the following lists:
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 okay doing a clean install again and just setting up with a few, what else can be helpful to you for debug? |
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 DID a clean install and found out 3 more things in windows 10 (linux 32bit a bit later). 1> This happens only on 32builds of Firefox even with default filter, just when the total size of filters or storage reaches around 30-35 mb, 2> compared to legacy version using with Palemoon & Firefox ESR52 this issue never happens, 3> In WebEXT version there is high disk/cpu/ram usage too especially when updating filters (SQlite in legacy was using chunks/append ? ) because data is added in KBs eg total size 5m->new update list->add 500KB update to DB->new size=5.5mb, but in WEBEXT stores all in ram then writes to disk every time so for eg: 30mb->uncompressed to ram->write full uncompressed data to disk-> This is very inefficient don't you think? Edit: Tested with chrome 60 32bit with huge filter-list, even with 70mb in size and no issues with it. |
I reported your observations here: https://bugzilla.mozilla.org/show_bug.cgi?id=1371255. |
Thank you ! @gorhill Hoping it gets fixed before FF57 lands any idea about priority @andymckay . |
I added new comments to https://bugzilla.mozilla.org/show_bug.cgi?id=1371255. Bottom line is that it's quite a serious issue with Firefox 55, and I don't see any trivial workaround for uBO. |
https://bugzilla.mozilla.org/show_bug.cgi?id=1371255#c11
like you said
|
He is not recommending to use sqlite API, that is a legacy API which use will not be allowed in FF57. He is recommending to use indexedDB. This will have to be the fix, but as said it's not trivial, and it's the 1st time I ever used this API, so I still have to learn how it works. It quite bothers me to learn just now from bugzilla that one shouldn't use I will be working to migrate the cache storage to indexedDB. Just keep in mind I am not a paid dev working full time on this project, so I don't know when I will have something ready. |
@gorhill thank you |
Looking at the files generated by Firefox when using indexedDB, I can confirm that the API uses sqlite behind the scene. |
I just recall @nikrolls using indexedDB to address a storage issue with Edge (size limitation). If I can reuse this that should help a lot to get something working sooner: https://github.com/nikrolls/uBlock-Edge/blob/master/platform/edge/vapi-background.js#L70. |
We want to get the API in Firefox faster and we'll probably do so by using an indexedDB backend at some point. The amount of data and frequency of data storage is something that surprised us. For example the Chrome docs do say how its "not a big truck". But the simple fact is people are storing a large amount of data there and quite regularly, so we've got to get it faster. I don't think we'll be able to do that in time for Firefox 57, there's a lot happening and its a risky patch for Firefox. I'm curious what % of your users you think this might affect. For AdBlock Plus we found it was an edge case where people had a large amount (say 60MB) of filters set up. Wondering if its similar. |
@gorhill So It's ublock0.sqlite that will be used in dev builds? Mozilla should have documented it. So the performance should be same as legacy version?
For ABP that was not an exception the size increased drastically when it shifted to storage.js,
This part is important too as the filters were not causing a lot of overheads even with the limited resources but reading(loading) & writing(storing) were causing the issues, here was using a way smaller file 15mb but could see the hit in performance as soon as webextention version was installed , plus when migrated ublock0.sqlite to storage.js it was like 30mb((~12mb in SQlite.db & that's how hit the bug) so guessing that the number will be in most cases not an EDGE case and will keep on increasing as filter-lists add more and more. IMHO the size is not the matter but the performance, let the user have 100mb of data, And why does 32bit builds fails to write the data of ABP and uBO ?
wait so this
is not possible ?
sqlite DB is used in Legacy so why not implement it in the back-end? Does indexedDB provide a better performance than sqlite DB or are both the same thing? EDIT:
@andymckay why wait as it is a severe improvement(if too risky put it behind a preference so we can test), afaik Firefox uses it too so should not be a problem theoretically Sorry to bug you all so much and not trying to be a witch just interested in how things tick but also this is my way of contributing and making things better |
@shellye5 You may want to give a try to 1.13.11rc1, see if this fixes your issue. |
@gorhill thanks and yes going to test it now! Can you elaborated on other things asked just before your last comments? please https://bugzilla.mozilla.org/show_bug.cgi?id=1313401 will affect this 1.13.11rc1? |
@gorhill Did a quick test and found a few things which you need to know about.** **1.13.11rc1 takes a while for migration,which is understandable ** @andymckay can you shed light on this? but the filesize is double of storage.js!! _let alone the size of legacy version which was fairly small. eg say 12mb in legacy- 30mb in storage.js- 85mb in new indexedDB extension-data is used as storage in legacy & has only one file(which is compressed) Now settings are stored in -browser-extension-data\uBlock Storage.js & filters in storage\default\moz-extension+++6a4e2ef8-e974-4cda-8cb9-e703d0900d68 But it's not ideal so can they be a single file just like legacy version in extension-data? It's better and simpler, easier to backup(local backup & sharing to multiple pc w/o downloading again). When starting FF uBo takes a bit more time to initialize and open dashboard is slow and uses high CPU. Rest looks good in the short testing, will test more thoroughly and let you know. |
@gorhill there seems to be a huge regression in page loading times in webext 1.13.11rc1, Just open 10-12 bookmarks look at the loading times and now switch tabs.. EDIT: CPU usage skyrockets with even one filter , |
@gorhill Cpu 100% and Disk usage at startup halts the browser for good 30-60 seconds, Page loading times have gone up significantly even with just loading one page and opening multiple pages at once makes it painfully slow with again 100% CPU usage and high disk usage. Just to see open multiple reddit sub reddits at once and start typing in the comment box here, eg reproduced in these https://www.reddit.com/r/aww/ or just open 10 bookmarks in background scroll this page, keep looking at the loading time of pages while you scroll up & edit any one of the above comments to see the issue. Now open these with the 1.13.11rc0 version to see the speed difference This with just 1 filter(easylist) Is it because you used the EDGE code here to fix this? Seems like even worse than 1.13.11rc0 in term of CPU at startup and loading pages & Please consider reverting this change so beta users keep getting FEATURES+FIXES, |
Please, bring your issue to Mozilla, there is nothing I can do, uBO is merely using indexedDB, just as I was told to do by Firefox dev. Locking this issue because it's better to bring your specific issue to Firefox devs -- I've done what I could here. |
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
Download the latest version of Firefox Nightly.
Create a new profile.
Install any version of uBlock Origin. Make sure it's the webext.
Go to any site and create a rule to block a resource using the network filter ( || ).
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.
Your filter lists
Default.
Your custom filters (if any)
None.
The text was updated successfully, but these errors were encountered: