Closed Bug 1953735 Opened 4 months ago Closed 4 months ago

Prevent closing Firefox when updating addon (which closes that addon tabs)

Categories

(WebExtensions :: General, defect)

Firefox 137
defect

Tracking

(firefox136 affected, firefox137 affected, firefox138 affected)

RESOLVED DUPLICATE of bug 1904287
Tracking Status
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

  1. bad UX - from the user perspective this looks like Firefox just crashed right after starting

  2. for addon this may have much worse consequences, as post-upgrade scripts may be interrupted.
    Imagine for example async data migration script running in browser.runtime.onInstalled.addListener that needs to load and update some options in the storage.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

This is more like a design flaw, so I was not expecting anyone actually trying to reproduce it :), but sure, here is the STR:

  1. 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/
  2. open "about:config" and change "extensions.update.interval" to 130, so that you don't have to wait 24h to reproduce it
  3. close Firefox
  4. wait 130 seconds
  5. 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.

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1742771
Resolution: --- → DUPLICATE
See Also: → 1955530

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.

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.

Duplicate of bug: 1904287
No longer duplicate of bug: 1742771
See Also: → 1742771
You need to log in before you can comment on or make changes to this bug.