i managed to fix my other device using the following steps:
- Invoke Firefox with "firefox" (safe mode not needed)
- Using the hamburger menu, select Settings
- Select Privacy & Security in the left menu, then scroll down to the History heading on the right
- Click 'Clear History...'
- Uncheck everything except 'Browsing & Download History' (leave 'Time range to clear' at 'Last Hour')
- Click OK
- Quick Firefox (note: any current tabs will be lost)
- Restart Firefox
- Open some tabs, quit Firefox a second time, then start Firefox a third time; the tabs you just opened should be there now
NOTE: You might think it would be sufficient to use 'Hamburger menu -> History -> Clear recent history...'; but that doesn't work! You have to use the 'Clear History...' button from within Settings->Privacy and Security. Do they do something different? Or is it essential that the 'Settings' tab is open at the time that recent history is cleared? Other things that DON'T work are: (1) opening the History tab and manually right clicking on each recent entry and selecting Forget about this site; (2) going to 'Hamburger menu -> History -> Clear recent history...', unchecking everything except 'Browsing & Download History', but then clicking Cancel instead of OK.
NOTE: Before i did the above, i saved a copy of my profile folder. After Firefox is fixed by doing the above steps, i can break it again by (1) quitting firefox and then (2) overwriting the current sessionstore.jsonlz4 with the old sessionstore.jsonlz4 from when it was broken.
NOTE: When Firefox is in the broken state, i quit Firefox and made a copy of sessionstore.jsonlz4 and then inspected it using https://www.jeffersonscher.com/ffu/scrounger.html
sessionstore.jsonlz4 did not contain any open tabs.
NOTE: When Firefox is in the broken state, i inspected sessionstore-backups/recovery.jsonlz4 using https://www.jeffersonscher.com/ffu/scrounger.html
recovery.jsonlz4 contained the correct NUMBER of open tabs, however the URLs of the open tabs were wrong; the first tab was reported as about:home and every other tab was reported as about:newtab
My hypothesis is that there is some sort of corruption somewhere in sessionstore.jsonlz4, and when Firefox starts up it tries to load the corrupted data and this causes it to become corrupted in a way such that when it later tries to record open tabs, the first tab is recorded as about:home and other tabs are recorded as about:newtab, as can be seen in recovery.jsonlz4. When Firefox terminates it removes these seemingly-empty entries from the list written to sessionstore.jsonlz4. Removing recent 'Browsing & Download History' via 'Hamburger menu->Settings->Privacy & Security->Clear History...' somehow resets some corrupted state such that when Firefox next terminates it writes an uncorrupted sessionstore.jsonlz4, although the part of the corrupted state causing the current session's tabs to be forgotten is still present in memory until Firefox quits. Upon quitting and restarting Firefox, now all corruption is gone, and tabs are being remembered again.
It is curious that (a) 'Hamburger menu -> History -> Clear recent history...' doesn't clear the corruption even though 'Hamburger menu->Settings->Privacy & Security->Clear History...' does, and (b) on one of my machines, starting Firefox in Safe Mode was sufficient to clear the corruption, but on the other machine, 'Hamburger menu->Settings->Privacy & Security->Clear History...' was necessary instead. One hypothesis is that various different kinds of sessionstore.jsonlz4 deviations occur from time to time, but prior to Firefox version 92, there was some automatic normalization that fixed it -- and perhaps something changed in Firefox version 92 that made it less tolerant to these deviations.
On my first machine, i didn't save a copy of the corrupt profile folder before i fixed it using --safe-mode. On my second machine, i have a copy of the old corrupt sessionstore.jsonlz4 -- I could attempt to isolate which part of my old sessionstore.jsonlz4 was corrupted by converting to a json, removing some part, converting it back to a jsonlz4, and seeing if it is still corrupted. However, i don't know how to convert back from a .json to to a .jsonlz4 -- perhaps someone could tell me how to do that? https://superuser.com/a/1363748 suggests a way, however, i can't find the 'Scratchpad' that it mentions, and in Web Console i don't know how to "change Environment from Content to Browser" -- and without that i get "ReferenceError: OS is not defined" when i try to do things like OS.File.read.