Sometimes Firefox opens with all of my tabs (and groups) empty: no session restore is provided and seems that all of my groups (more than 10 groups, with a total of 200 tabs) is simply disappeared.. it happend not only to me, as some googling shows.
What TH? Simply Firefox messed something up in your sessionstore.js file. Blogs suggest you to simply remove it and replace the backup automatically created by Firefox named sessionstore.old
But.. what if even this way gives you an empty set of tabs? Something is really wrong given the 3.8Mb sessionstore.js file!
The solution is only one: open the sessionstore.js file, fix its JSON contents and save it. But the problem here is: how can I edit a 3.8MByte JSON file without messing everything up?My solution is: write a tool to handle Firefox sessionstore.js! you can download it (called FFSessionfix) from my BitBucket account: bitbucket.org/thePanz/ffsessionfix/overview
It’s written in PHP (don’t blame me, it was my first and super-fast solution to get my groups and tabs back) and allowed me to fix and restore my 200 tabs! how? Simply fixing the data about closed windo that contained all of my tabs!
# Find the *real* window (look the [tabs] and the item count php ffsessionfix.php dump sessionfile.js # Remove the unused windows (and save to new file newsession.js) php ffsessionfix.php removeWindow --closed-window-id=2 --output=newsession.js sessionstore.js # Unclose the main window php ffsessionfix.php uncloseWindow --closed-window-id=1 --output=newsession.js newsession.js # Backup sessionstore mv sessionstore.js sessionstore.js.old # Replace sessionstore and use the new one mv newsession.js sessionstore.js
Feel free to clone my repository and improve it!
Thanks to Dag Wieers post for some insights!