-
Notifications
You must be signed in to change notification settings - Fork 17
"Show the number of blocked resources on the icon" may be temporarily forced to default when restoring session #75
Comments
That's not possible for me to recreate. Is that a specific requirement ? Aside from that, I cannot reproduce. Most likely a race condition due to Restore previous session settings which forces to restore immediately upon startup. |
Just a parenthesized clarification on the situation where the problem has been observed outside test conditions. I'll see if I can find time to produce something more reliable later. (One idea I have is to try with a warm filesystem cache and then clear out the drive and OS read caches before running the test in order to see if that alters the chances of a successful reproduction.)
That was my hypothesis too, given the symptoms. |
I tested with 5 tabs of blogs with heavy content blockage on both Chromium and Firefox, the setting sticks, still cannot reproduce. |
Yes. uMatrix is not guaranteed to be fully ready when the browser loads the tabs, and given in the current case there are hundreds of tabs, tens of extensions (of which uMatrix is just one of them), uMatrix probably finishes loading user settings after the tabs finished loading. You can actually reproduce with a simpler scenario: open uMatrix's dashboard in a separate window, have a tab with blocked stuff in the original window (such that there is a badge for it displayed), and toggle the setting "Show the number of blocked requests on the icon": the badge is not toggled unless it needs to be re-rendered. It's really a very transient "glitch" though, just switching tab or whenever the tab is reloaded, the issue disappear. I consider this a bottom-of-the-list issue given that: difficult to reproduce + only cosmetic + very transient. |
I'm guessing this is another facet of the ongoing problem of WebExtensions not yet providing a way for early tab loading to block on extensions being ready to filter the requests? (Because, otherwise, I'd wonder why you're not storing all the settings in whatever datastore is currently used for user rulesets.) |
The race condition is an issue which hasn't been addressed as expected. |
You are assuming wrong, they are saved in the same datastore. |
I wasn't assuming anything. I wrote that as an "otherwise" case after saying something that boils down to "I'm guessing this is another symptom of WebExtensions not giving uMatrix sufficient power to ensure proper ordering of operations?". |
Note that whenever I fix #69 the current issue could go away as well. |
Hopefully. Either way, I'm in no rush. I just wanted it to be "on file". |
Prerequisites
Given that it happens as part of session restore, I couldn't figure out a way that it would be possible to bring the logger into play... even if rulesets were able to control this particular aspect of the UI.
Given the nature of the problem, which I suspect to be a race condition, I'm going to need to block out some serious time to test under the reduced conditions (uMatrix only, default lists/settings, new browser profile), since I don't yet have a standard practice for quickly building a fresh browser profile that's intentionally bogged down and I wanted to know whether what I've submitted is enough before I potentially spend needless time on it.
Description
Sometimes, when I restart my Firefox, uMatrix displays the active tab's browser action with the blocked resource count visible, despite the "Show the number of blocked resources on the icon" checkbox being unchecked.
The browser action for any tab loaded or reloaded after the session restore finishes (including reloading the same tab) will obey the user preferences as expected, so I suspect this is some kind of race where it's falling back to default settings because loading the user preferences was delayed.
A specific URL where the issue occurs
This time, the tab which was active after I restarted the browser was pointed at piroor/treestyletab#2006 (comment)
Steps to Reproduce
Supporting evidence
Your environment
The text was updated successfully, but these errors were encountered: