-
Notifications
You must be signed in to change notification settings - Fork 76
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
Settings ignored as added lists reloaded after Firefox launch in private mode #2725
Comments
Unable to reproduce.
Those symptoms is what you would get if uBO was not able to save locally to indexedDB storage:
Since I can't reproduce, you need to investigate on your side why your version of uBO is not able to persist data to its indexedDB. See what the Firefox console reports. |
I have the same problem. If you always start Firefox in private mode, lists are always out of date and initialization time is longer. Xubuntu 23.04 If you disable always starting in private mode and use clear everything on exit option, uBlock Origin works fine. |
I installed Firefox 115 on Windows 10 in a virtual machine, configured Firefox to always start in private mode and installed uBlock Origin 1.50.0 from Firefox Addons site. The same thing happens. Every time you start Firefox, filters are out of date and uBlock Origin updates them. |
Best is that whoever can reproduce investigate why uBO can't write to its local indexedDB -- just pointing out that you can reproduce won't advance resolving the issue. |
Sorry about that. You couldn't reproduce the problem and I had a flatpak and a snap version of Firefox that sometimes behave in strange way because of the sandboxing, so I did a clean install on Windows 10 and reproduced the problem. I investigated a little bit more and the problem is in Firefox 115. When I install Firefox 114.0.2 and disable automatic updates, everything is working as expected. When i upgrade to Firefox 115, uBlock Origin stops working as expected if you enable "Always use private browsing mode" or use "--private" startup switch (you need to close all the normal windows first). In Firefox 115 they added:
Maybe when they added that functionality they broke something else. I don't know if you can fix this on your end. |
I was still on Firefox 114 in my distro when I tested, and following your comment, I checked and saw there was a pending update for Firefox 115, and now I can reproduce. If what you report is the issue, that would be a regression in Firefox since I am pretty sure the indexedDB of extensions is not supposed to be targeted. Normally uBO would fall back to using However there is a manual workaround: to I will have to think about if/how to address this unexpected behavior in the code. |
Related bugzilla issues: |
But only if the indexedDB is being created. Related issue: - uBlockOrigin/uBlock-issues#2725
I added a new heuristic in 1.50.1b15, which works as follow: If all the three following conditions are true:
Then uBO will use browser.storage.local API to cache data instead of indexedDB API. I would like to have feedback about whether this works well. |
Fresh Firefox 115 installation with uBlock Origin 1.50.1b15 on Windows 10. Firefox icon is copied and "--private" startup switch is added to it. Firefox is started with normal icon and changed icon. NORMAL - normal Firefox icon
(If the filters are out of date, I manually update the filters for speed. The same thing would happen if I waited for automatic update) When you start Firefox in normal mode, filters are always OK. If you start in private mode after normal mode, filters are always out of date. If you start private mode two times in a row, filters are OK. If I'm understanding this correctly, normal mode always uses indexedDB, and it persists across changing of modes. Private mode uses browser.storage.local and it gets erased when you change to normal. Could you use indexedDB for normal mode and browser.storage.local for private mode without erasing it. The storage would be in two places, but everything would be working as expected. If Firefox fixes deletion of extensions indexedDB you could change to only using indexedDB. |
very gladly, with beta 1.50.1b15 the issue is no longer present. (Browser is Firefox, Context is private mode, indexedDB has not yet been created) System / Settings: Thank you very much for your very good work, gorhill. |
@AnteBucan Thanks for the thorough testing. From your results, I gather that when Firefox is started in private mode, Firefox uses a separate indexedDB than the one used in normal mode, and consequently the issue is still present when alternating between private and normal mode. I don't think keeping two cache storages is going to work though, the code assumes there is only one cache storage present and this could lead to seriously broken uBO because uBO keeps a version identifiers of currently cached compiled lists and memory snapshot in its normal storage, and having an unexpectedly stale cache storage could result in a mismatch between the version identifiers recorded in its normal storage and the data loaded from the stale cache storage. |
Yep I'm having the same exact issue as everyone in Firefox. My guess is a recent firefox update broke functionality. @gorhill will this be fixed in a future version of ublock origin? Or does mozilla have to fix this on their end? |
While this does need to be fixed by Mozilla, gorhill has put out a temporary fix which I believe is currently in beta. |
Update from Mozilla:
|
Prerequisites
I tried to reproduce the issue when...
Description
Mind the false on the "suspendUntilListsAreLoaded" and "autoUpdate" settings. The "added" lists ignores the global setting ("auto update" and "uspend network activity until all filter lists are loaded" were unticked) and reloading from the web after launch.
A specific URL where the issue occurs.
N/A
Steps to Reproduce
firefox --private
)Expected behavior
Non-default lists like CHN-0 and fanboy-cookiemonster will loaded from cache
Actual behavior
The lists keeps updating everytime I launch my browser in private mode, bypassing the extension's global settings.
uBO version
1.50.1b12
Browser name and version
Firefox 115 (both PPA deb and Flatpak)
Operating System and version
Ubuntu 23.04
The text was updated successfully, but these errors were encountered: