Prevent closing Firefox when updating addon (which closes that addon tabs)
Categories
(WebExtensions :: General, defect)
Tracking
(firefox136 affected, firefox137 affected, firefox138 affected)
People
(Reporter: juraj.masiar, Unassigned)
References
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
Updating addon will close its tabs.
If there is only one tab opened - with that addon page - update will close Firefox.
How likely is this?
This can easily happen, if the addon overrides New Tab page, because New tab page is likely opened when you start Firefox (not everyone uses session restore), and Firefox is likely to check for updates soon after starting.
I've seen this many times when I'm testing new version in different Firefox releases.
The issues
-
bad UX - from the user perspective this looks like Firefox just crashed right after starting
-
for addon this may have much worse consequences, as post-upgrade scripts may be interrupted.
Imagine for example async data migration script running inbrowser.runtime.onInstalled.addListener
that needs to load and update some options in thestorage.local
.
Solution
For example, chromium browsers when updating extension that overrides New Tab page will navigate the tab to 'chrome://new-tab-page/' (instead of closing it).
Firefox could navigate to about:home
or about:blank
.
Hello,
I am not able to reproduce this issue on my side. Can you please add the specific steps performed in order to try again?
Thanks,
Victor
Reporter | ||
Comment 2•4 months ago
|
||
This is more like a design flaw, so I was not expecting anyone actually trying to reproduce it :), but sure, here is the STR:
- install older version of some addon, for example open this page and install version 26.0:
https://addons.mozilla.org/en-US/firefox/addon/groupspeeddial/versions/ - open "about:config" and change "extensions.update.interval" to 130, so that you don't have to wait 24h to reproduce it
- close Firefox
- wait 130 seconds
- start Firefox and wait a bit... (let's say up to one minute). Note that upon start, you should see the speed dial addon page - which overrides the New tab page.
Comment 3•4 months ago
|
||
Hello,
Thank you for the STR !
I reproduced the issue on the latest Nightly (138.0a1/20250316213034), Beta (137.0b6/20250314092052) and Release (136.0.1/20250310180126) under Windows 11 and Ubuntu 24.04 LTS.
After Step 5 from Comment 2, the browser will suddenly close as the add-on gets updated since this closes the add-on page (which has overridden the New Tab page), confirming the issue.
Updated•4 months ago
|
Reporter | ||
Comment 5•4 months ago
|
||
Hello Rob,
I think you've made a mistake here :), the duplicate bug you linked is about "Updating the browser while having the extensions' tabs open.".
This bug is about Firefox being closed when addon is updated - because if you have only one tab opened, and that tab is extension which updates, it will close Firefox.
Comment 6•4 months ago
|
||
Thanks for the correction. Although they are all related to the fact that extension unload closes tabs, the reported consequences are indeed different.
The scenario that you described was already reported before, as bug 1904287. Its STR also uses the same extension as yours in comment 2.
Description
•