This is a quick-n-dirty how-to fixit for one particularly brain-dead Firefox bug. It’s two parts: the short term fix, and the long term fix.
This will only help you in case you encounter a particular version of
the generally buggy Firefox session management. In this version of the
bug, you open Firefox one day to discover that all of your tabs (and tab
groups) are gone. However, when you eventually do follow the breadcrumbs
and find your
sessionstore.js, you may notice that it’s really small, while
sessionstore.bak is much larger. If this is the case, then you may be suffering from
this annoying (and yet fixable) problem.
So, here’s what you do when your tabs disappear.
- Exit Firefox. Print this page, or open it in another browser, but get out of Firefox.
- Locate your
sessionstore.js. This page tells you where to look for it.
- Copy all of the
sessionstore.*files somewhere safe, just in case.
- Check the file sizes. If the backups are larger than the
.jsfile, then you might be in luck.
- Make a copy of the most promising backup, and do a JSON pretty-print of it. One tool that can help you do this is jsonpp. Here’s an online tool that does the same thing, if you don’t care if the world sees your links or whatever.
- Scroll to the bottom of the file, and look around for a
"windows" : structure. If you find it, that’s good news: you almost certainly have encountered this bug.
- Scroll to the top and look for a
"_closedWindows" : [structure (yes, I intentionally omitted the closing bracket). If it has a whole bunch of things in its brackets, then move that content into the brackets of the
"windows"structure. Don’t copy it, move it. If you’re using
vimlike an intelligent and sane person, then just do:
- Move this file to
sessionstore.jsin your profile directory (from where you got the original).
- Open Firefox. Voila, your tabs and groups are restored.
Step two, the long term fix: stop using Firefox, and start using Chrome/Safari/Opera.