How to lose some of your tabs in Firefox 107+ (and possibly earlier)

December 4, 2022

Recently, over on the Fediverse I said:

In Firefox 107 (and possibly earlier), if you convert a browser window into a tab in another window, quit Firefox, and restart, you lose the window-to-tab tab. It doesn't even make it into the session store. This is a potential 'data' loss, in that you can lose URLs that you wanted to read/etc.

(This is filed as bug #1801952.)

If you quit and restart Firefox normally, you have to have 'Open previous windows and tabs' turned on in Preferences in order to see this; I don't know how common that is (although it's something that I think of as essential for Firefox usage). If your Firefox just crashes (or is abruptly shut down when your session ends), this can (well, will) happen when you restart and Firefox tries to recover your aborted session.

This comes up for me because I default to opening URLs in new windows instead of in tabs, but periodically I open a burst of new windows that actually should be grouped together so I dock all all but one of those windows as tabs in the first window. People who default to tabs probably won't see this, since it's likely to be rare that you use a new window, never mind dock a window back into a tab.

You can still 'dock' URLs from windows into tabs, by opening a new tab and then pasting the URL from the window into the tab. This does preserve the new tab in Firefox's session history, although you only get the URL and not the history of the window it came from (if that history is important).

(Dumping a modern Firefox session store to inspect it or verify issues like this is somewhat involved. See for example this. I have my own tool for it, but it's a hacked up thing.)

Many Firefox issues are relatively easy to track down to a specific change using the excellent mozregression tool, and I normally do that. Unfortunately, mozregression normally expects you to be able to tell it if a given revision is good or bad with a single run of Firefox, and in this case it takes either two runs or manual inspection of the saved session state in whatever profile directory mozregression is using. So far I haven't been energetic enough to slog through the extra work that would be required to find the specific commit.


Comments on this page:

I've seen this a couple of times, but never realized exactly what caused it.

One thing I did notice is there's a way to tell if a tab will be lost before quitting Firefox: try to duplicate the tab by middle-clicking the refresh button. If the tab is broken, you just get a new empty tab instead of a duplicate.

By cks at 2022-12-05 18:34:16:

Thank you K, your test is extremely useful and also reveals some very weird behavior. If you open something in a new window, duplicate the window with the middle button on refresh, close the duplicate, and then dock it into a tab, the problem isn't there. Correspondingly, if you open something in a new window (by itself), dock it into a tab, and undock it again to go back to the original window state, now middle button on refresh only opens a blank tab instead of a duplicate. You have to actually duplicate the new window's first tab; opening a new tab (even browsing to something in it) doesn't change the situation.

By nobrowser at 2022-12-05 18:51:54:

duplicate the tab by middle-clicking the refresh button

This doesn't seem to work for me on the Mac. It would be very useful, because I duplicate tabs often, and I have to do it by right-clicking on the actual tab and picking from the context menu, which is definitely more work.

Written on 04 December 2022.
« Using Dovecot 2.3's 'events' system to create Prometheus metrics
I've now disabled systemd-oomd on my Fedora desktops »

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

Last modified: Sun Dec 4 22:49:03 2022
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.