-
Notifications
You must be signed in to change notification settings - Fork 83
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
Custom filter lists sometimes won't update + an exception throwed in a browser while pressing update button in uBO #682
Comments
Does not look like issue. uBO downloads list from browser cache. If you wait one hour it should change this |
About exception: |
Browser is throwing an exception which isn't caught. Similar Firefox bugs -- https://bugzilla.mozilla.org/buglist.cgi?quicksearch=0x80040111&list_id=14820451 |
@kulfoon What you use as a server? Can you enable XHR in browser console and check what is happening with this network request? |
I think that it doesn't matter as the issue occurs on chrome-based browsers too and on the chrome based browsers there is no need to use a server, thus I don't use a server there. Currently I can't reproduce as it is annoying kind of a random issue, but I'm sure it's a matter of time when I'll reproduce as the issue occurs during the whole last several months, thus when I reproduce I'll tell you then what Network tab shows, maybe it's like in #682 (comment), not an issue but a feature, will see. |
What errors do you get in uBO's dev console with Chromium-based browsers? |
As for "Custom filter lists sometimes won't update" issue I don't get any errors in dev console neither in Firefox nor in Opera, nor I get any errors in uBO logger, only in Firefox's browser console I get the exception, but as it was pointed out it's most probably not related. I was able to reproduce "Custom filter lists sometimes won't update" issue now and it seems it has to be what gwarser said in #682 (comment), a feature and not an issue. When the issue occured now first time:
I changed the content again and updated the filter list and the issue occured the 2nd time:
So it seems a feature and not an issue, I just wonder: a) after updating the modified filter list second time, in the both reproduced cases above I didn't need to wait an hour to get the list freshly updated (not from cache), I just updated the 2nd time instantly after the 1st time, so what about this "an hour" timer ? On the other hand, also I remember in the past sometimes clicking update list multiple times and it refused to update the list, now it updates just after 2nd try. So what's going on with all these random update time fluctuations ? b) where is one of the XHR request Nr 2, as seen on the screenshot there are only 3 XHRs, but should be 4, any idea? But never mind. |
This "feature" (gorhill/uBlock#2592) fixes cashing issue causing Fanboy lists not updating for years (potentially), that's why it was set to one hour. On your side browser may cache your list only for few minutes and you will see it as not updated / not working properly. Side note: "Refresh" button on browser toolbar does not reload pages from network if you click it only once (without modifier keys). But if you click it few times it does hard reload. It should work in similar way with these XHR's. |
The hour timer is not a fixed value as per my experience. If your list doesn't get updated the first time, waiting few minutes and updating again will do. |
Search parameter is incremented every hour - |
Ok, I get it now, the issue was a bit annoying for me becasue it disrupts developing a local filter list, because it makes me unable to test my new freshly added filters, so I'll have to change my method of developing a local list and testing new filters, I will have to copy particular filters from a local list to My Filters pane and then do all the modifications and tests, and then copy-back to a local filter list, but this is not too safe, as during the copy-back some mistake might happen, and the final result of copy-paste might be buggy / different, it's always best to test on a final place/file to make sure that the entered data was not affected during entering, the way of developing I will have to stick to currently, might lead to a buggy filter list.... So I want to close this thread. |
I will try to come up with an advanced setting to force an unconditional bypass of the cache when fetching a filter list. |
so will it always work at the first attempt with the advanced setting ? |
Oh, it will be a good idea gorhill. |
Related issue: - uBlockOrigin/uBlock-issues#682 (comment) The following advanced setting has been added: updateAssetBypassBrowserCache Default to `false`. If set to `true`, uBO will ensure the browser cache is bypassed when fetching a remote resource. This is for the convenience of filter list maintainers who may want to test the latest version of their lists when fetched from their remote location.
I confirm - working, very useful, finally no problems with instant testing freshly updated filters lists. |
After X days working with no problem (updating instantly at the time I force and hit the update button), since several days it sometimes won't update again despite the fact "marking the clock icon and then pressing the update now button", even repeating the same X times, and nothing, then after like 5 minutes or repeating the update process it finally will update, also another case - at the moment just right now I've tried to update uBlock filters like 10 times and nothing, I had to disable the list and then press the accept button, and then enable the list back and press the accept button and it finally have updated, so I'm confused, is such behaviour a feature or a bug? |
What list was this? Did you investigate on your side first to ensure that uBO is really fetching with a different URL every time? Did you look at the network requests in dev tools and look at the server response? |
"uBlock filters" (the main uBlock list) if u asking me for the today case. As for the previous cases from previous several days, I don't remember the list names.
I did not yet, because the issue is always random, especially today, I was dealing with this uBlockOrigin/uAssets#6175, I had the anti-adblock message, so I updated all the lists as mapx suggested, still the anti-adblock message was appearing, I was kinda annoyed what's going on, so I was keep updating all the list several times, and still nothing, then I was disabling all the list one by one, still was having the anti-adblock message with some single filter list, then I was enabling back all the list ony by one, and at the time I enabled back all the lists, the anti-adblock was gone, and I saw uBlock filters list got updated (number of filters decerased from like over 19100 to 19 064, (the SECOND number with count of the total filters, not the first number which might change sometimes despite the list being enabled / disabled.) I hate random issues, but I'll try to investigate. I have uBO 1.21.9b3, but the issue was happening last days with some earlier versions of uBo deta / dev, so I'm not sure when it exactly started. Also when it was happening last days, I thought it was maybe just some occasional glitch caused by hell knows what so I didn't bother, but now I see the issue keeps repeating from sometimes to sometimes. |
There might be a good delay before GitHub serve an updated version after a commit. If uBO sends a different URL every time and GitHub still serve the old list, there is nothing uBO can do. |
I need to fix this again, going through some code review I realized I have introduced a regression in this commit which remove all ability to bypass browser cache. |
Swathes of code have been converted to use Promises/async/await. More left to do. In the process, a regression affecting the fix to <uBlockOrigin/uBlock-issues#682> has been fixed.
Prerequisites
Description
Custom filter lists sometimes won't update, the issue has been happening to me since several months already, but I wasn't sure whether it was uBO's issue, and I was hoping somehow that it was just a temporary issue, which might be fixed somehow in uBO or in a browser as the time passes, but it hasn't happened, and the issue is getting annoying more and more, so I decided to create an issue. I'm still not sure whether it's uBO's, a browser's or an user's issue, but knowing that it occurs in two different browsers (Firefox, Opera) (and in Firefox in two different profiles, which one of them is reasonablly fresh) it seems to be not a browser's issue. Also this guy krystian3w has the same issue, we both have talked in the past about it, I don;t remember exactly, but he was saying something about that to force a successfulludpate of the list in this case is to add some string at the end of the list path name and visit it in a browser, something like a question mark followed by a some number like this
?_=9
which is visible in the uBO logger while updating a filter list, it sometimes works but not always, it seems to not work anymore for me. Unfortunatelly this guy will not reply here in this thread to help us because I had to put him on my blocklist due to his ugly behaviour so he can't reply to my threads anymore.A specific URL where the issue occurs
An example local list file path:
http://localhost/local_filters_lists_uBO/my_example_list_my_example_list.txt
Steps to Reproduce
Expected behavior:
Custom filter lists should be always updated.
Actual behavior:
Custom filter lists won't (SOMETIMES! - hard to reproduce it always! sometimes a filter list will be updated with no problems) update in uBO, despite the fact that the physically txt file has been modified and saved, uBO still showing the old content of the txt file. Repeating the update process: reediting / resaving the txt file and / or clicking update buttons in uBO multiple times or clearing the uBO cache, or hard reloading the page with filter list content bypassing the cache, or restarting a browser or a virtual server in Firefox, gives no result. After some random time, sometimes minutes, sometimes hours, the local filter list will finally update itself with no human input, just doing some random stuff on PC, not always internet related, and then randomly coming back to uBO to see that the list has finally updated itself as the time has passed.
In Firefox, in the browser console I noticed an strange exception which is being throwed exactly at the time I hit main Update button in uBO, not sure whether it's related and whether it's uBO's, a browser's or an user side's issue, (couldn't find a similiar browser's console in Opera, to see what it will say, and a normal Opera's (or Firefox's) console has throwed nothing) (also I don't remember whether the exception was occuring in older versions of uBO and the browser, than the current ones I'm using):
Your environment
The text was updated successfully, but these errors were encountered: