An interesting little glitch in how Firefox sometimes handles updates to addons

October 27, 2019

Every so often I run into a bug where the implementation shows through, or at least it looks like it does. Today's is in Firefox. On Twitter, I said:

It's pretty clear that the Firefox developers don't both leave their Firefox sessions running all the time and use addons that update frequently. I could file a bug, but bleah.

There's an additional condition for this glitch that I forgot to put in my first tweet, which is that you almost certainly need to have addons set to not auto-update.

When you have addons set to not auto-update, about:addons can have a tab for 'Available Updates'. For your convenience, the icon and text for the tab has a count, and if you go to the tab you can see the addons with pending updates and get an option to update each of them. The glitch comes about if a particular addon accumulates more than one pending update before you update it. If it does, the tab's count will never go to zero and disappear until you restart Firefox, even if there are no pending updates for addons left any more.

(Sometimes this happens if you just let Firefox sit for long enough, for example if it's running over a long weekend on your work desktop; sometimes this happens if there's one update that Firefox has auto-detected and then you ask Firefox to 'Check for updates' and it detects a second update to the addon.)

My guess as to how this glitch came about is that the implementation counts detected updates, not addons that have at least one pending update. Every time Firefox detects a pending update, it increases the count, and every time it applies an update it decreases it again. But the problem here is that Firefox only ever updates to the most recent version for an addon even if it has accumulated several new versions, which means that if an addon has multiple updates, the count gets incremented more than it gets decremented. Restarting Firefox causes it to redo everything from scratch, at which point it notices at most one pending update per addon (the most recent update) and the count is correct (for a while).

(In my case I've decided to use the development versions of uBlock Origin and uMatrix as a very small way of helping out in their development. I've never noticed any new glitches or bugs, but maybe someday I'll contribute.)

Comments on this page:

Another variant, in the main hamburger menu:

Addon Foxyproxy needs new permissions (update X)

Addon Foxyproxy needs new permissions (update Y)

Had to click both individually to get rid of them. Not sure if this signalled updating to the wrong version or not :P

Written on 27 October 2019.
« My common patterns in shell script verbosity (for sysadmin programs)
One of XHTML's practical problems was its implications for web page generation »

Page tools: View Source, View Normal, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Oct 27 22:19:53 2019
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.