This is how I got them back.
- DO NOT CLOSE AND REOPEN FIREFOX!
- Immediately find the "sessionstore.bak" file and make a copy of it to sessionstore.txt.
cp ~/.mozilla/firefox/*.default/sessionstore.bak ~/sessionstore.txt
(Windows users
C:\Users\name\AppData\Roaming\Mozilla\Firefox\Profiles\<random>.default\sessionstore.bak) - Open the file with a text editor and paste it into this site http://jsonviewer.stack.hu/. To make it readable, Click "format".
- Save the output to a new file named "sessionstore2.txt"
- Open the new file in a text editor.
{
"windows": [
],
"selectedWindow": 0,
"_closedWindows": [
{
"tabs": [
{
I deleted 4 lines so it looked like this:
{ "windows": [ { "tabs": [ {
- Save the file.
- Close all Firefox windows.
- Delete the old sessionstore.js file.
~/.mozilla/firefox/*.default/sessionstore.js
OR
C:\Users\name\AppData\Roaming\Mozilla\Firefox\Profiles\<random>.default\sessionstore.js - Move "sessionstore2.txt" to replace the deleted file. Rename it correctly as sessionstore.js.
- Start Firefox and see if it worked.
Hopefully this helps!
An alternate way to format JSON on Linux.
$ json_reformat < sessionstore.txt > sessionstore2.txt