Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Natao arisiva ity resaka mitohy ity. Mametraha fanontaniana azafady raha mila fanampiana.

Lost tabs, already tried system restore and recovering sessionstore files from shadowexplorer

more options

Today, after I tried to uninstall some mouse drivers leading to a freeze and reboot, my firefox upon starting lost hundreds of open tabs I had, only restoring 1 tab which I am pretty sure I did not even have open. I have already followed solutions in similar problems like this (https://support.mozilla.org/en-US/questions/1310742), which did not work. First I used shadowexplorer to recover sessionstorebackup files from a restore point on 10/15, most of which did not seem to open anything when using them with the scrounger tool. One of them did open, however it only showed 2 tabs when I would have had hundreds. None of these files did anything when I renamed them to sessionstore.jsonlz4 and placed them in the appropriate folder, even if I deleted the original sessionstore file. Firefox also seemed to be able to recover tabs which I opened after the loss of the original tabs, and renaming and replacing of the sessionstore file until I tried deleting the entire sessionstore backups folder.

I also tried simply doing a system restore back to 10/15, which also failed to help. After doing a system restore, I also tried the whole process of recovering sessionstore backup files and replacing them again, however nothing changed again. I also tried recovering the sessionstore.jsonlz4 file directly and using that to replace my current sessionstore.jsonlz4 file, but that also did not work. The replacement files do seem to contain tabs, as most of them are around a couple MBs large, but after I place them in and restart firefox they get reduced in size back to almost nothing.

The only thing I have not tried is using files from an even older restore point on 10/12, although after having restored to the 10/15 point my 10/12 restore point seems to have disappeared. I can try undoing the restore in order to try to view the 10/12 restore point again, but this process takes multiple hours and I would rather not.

Today, after I tried to uninstall some mouse drivers leading to a freeze and reboot, my firefox upon starting lost hundreds of open tabs I had, only restoring 1 tab which I am pretty sure I did not even have open. I have already followed solutions in similar problems like this (https://support.mozilla.org/en-US/questions/1310742), which did not work. First I used shadowexplorer to recover sessionstorebackup files from a restore point on 10/15, most of which did not seem to open anything when using them with the scrounger tool. One of them did open, however it only showed 2 tabs when I would have had hundreds. None of these files did anything when I renamed them to sessionstore.jsonlz4 and placed them in the appropriate folder, even if I deleted the original sessionstore file. Firefox also seemed to be able to recover tabs which I opened after the loss of the original tabs, and renaming and replacing of the sessionstore file until I tried deleting the entire sessionstore backups folder. I also tried simply doing a system restore back to 10/15, which also failed to help. After doing a system restore, I also tried the whole process of recovering sessionstore backup files and replacing them again, however nothing changed again. I also tried recovering the sessionstore.jsonlz4 file directly and using that to replace my current sessionstore.jsonlz4 file, but that also did not work. The replacement files do seem to contain tabs, as most of them are around a couple MBs large, but after I place them in and restart firefox they get reduced in size back to almost nothing. The only thing I have not tried is using files from an even older restore point on 10/12, although after having restored to the 10/15 point my 10/12 restore point seems to have disappeared. I can try undoing the restore in order to try to view the 10/12 restore point again, but this process takes multiple hours and I would rather not.

All Replies (10)

more options

Did you back up what was in the sessionstore-backups folder immediately after you realized the problem? If so, I would "Scrounge" those first.

I'm puzzled that multi-megabyte file doesn't have any tabs in it, but sometimes recovery tools give you a file padded with garbage and Firefox can't read. Was the Scrounger able to read those files or did it say they were corrupted?

more options

jscher2000 said

Did you back up what was in the sessionstore-backups folder immediately after you realized the problem? If so, I would "Scrounge" those first. I'm puzzled that multi-megabyte file doesn't have any tabs in it, but sometimes recovery tools give you a file padded with garbage and Firefox can't read. Was the Scrounger able to read those files or did it say they were corrupted?


I did not backup those files, however I believe I did scrounge them and found that they only contained tabs made after the disappearance of my old tabs.

Outside of the 1 file that partially works, nothing happens when I add a file to the scrounge tool at all, and if I click scrounge urls I get the message "Session history file contents could not be read?"

As a side note, I have undone my restore to 10/15 however I still do not have my 10/12 restore point. Additionally, I synced my firefox a couple of days ago as I thought it might be a way to save tabs should they be lost, however I did not sync any 2nd device and it seems that from searching online you cannot save tabs this way regardless.

Novain'i andrewln627 t@

more options

andrewln627 said

Outside of the 1 file that partially works, nothing happens when I add a file to the scrounge tool at all, and if I click scrounge urls I get the message "Session history file contents could not be read?"

When you drop a .jsonlz4 or .baklz4 file on the box, a script in the page should decompress it to its textual form. Does that look readable, like

{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[{ ... etc.

Or does it have junk characters in it? Or is it blank?

more options

jscher2000 said

andrewln627 said

Outside of the 1 file that partially works, nothing happens when I add a file to the scrounge tool at all, and if I click scrounge urls I get the message "Session history file contents could not be read?"

When you drop a .jsonlz4 or .baklz4 file on the box, a script in the page should decompress it to its textual form. Does that look readable, like

{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[{ ... etc.

Or does it have junk characters in it? Or is it blank?

Nothing changes at all, other than this line appearing below the box. File name: recovery.jsonlz4; Size: 4457566; last modified 10/15/2021, 12:31:19 AM

I do get text like that on the files that partially work, however.

Novain'i andrewln627 t@

more options

If the box doesn't have a scroll bar indicating it is full of content, there may have been an error decompressing the file. Another way to decompress a .jsonlz4 file is to use a script in Firefox's Browser Console (a separate window). I have a sample script here: https://gist.github.com/jscher2000/4403507e33df0918289619edb83f8193

As noted there, you need to modify a setting first before opening the Browser Console (Ctrl+Shift+J) to enable the command line.

more options

jscher2000 said

If the box doesn't have a scroll bar indicating it is full of content, there may have been an error decompressing the file. Another way to decompress a .jsonlz4 file is to use a script in Firefox's Browser Console (a separate window). I have a sample script here: https://gist.github.com/jscher2000/4403507e33df0918289619edb83f8193 As noted there, you need to modify a setting first before opening the Browser Console (Ctrl+Shift+J) to enable the command line.

After doing this and selecting the file, nothing happens and the file selection screen just closes.

more options

It sounds like the files are not usable. I'm not sure what else to suggest.

more options

You can try to run this code in the Browser Console:

async function decompressFile(oFilePath,nFilePath){
let jsonString = await OS.File.read(oFilePath, { compression: "lz4" } );
await OS.File.writeAtomic(nFilePath, jsonString );
}
var fu = Cu.import("resource://gre/modules/FileUtils.jsm").FileUtils;
var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
fp.init(window, "Open File", Ci.nsIFilePicker.modeOpen);
fp.appendFilter(".*LZ4* Compressed Files","*.*lz4*");
fp.appendFilter(".LZ4 Compressed Files","*.lz4");
fp.displayDirectory = fu.File(OS.Path.join(OS.Constants.Path.profileDir, ""));
fp.open((aResult) => {
  if (aResult == Ci.nsIFilePicker.returnOK) {
   if (fp.file.exists() && fp.file.isFile() && fp.file.isReadable()) {
    var oldfile = fp.file.path;
    var newfile = oldfile + ".json"; // output file name
    try {
      decompressFile(oldfile, newfile);
      console.log("Saved as: \"" + newfile + "\"");
    } catch (err) {console.log(err);}
   }
  } else {console.log("<canceled>");}
});

more options

cor-el said

You can try to run this code in the Browser Console:
async function decompressFile(oFilePath,nFilePath){
let jsonString = await OS.File.read(oFilePath, { compression: "lz4" } );
await OS.File.writeAtomic(nFilePath, jsonString );
}
var fu = Cu.import("resource://gre/modules/FileUtils.jsm").FileUtils;
var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
fp.init(window, "Open File", Ci.nsIFilePicker.modeOpen);
fp.appendFilter(".*LZ4* Compressed Files","*.*lz4*");
fp.appendFilter(".LZ4 Compressed Files","*.lz4");
fp.displayDirectory = fu.File(OS.Path.join(OS.Constants.Path.profileDir, ""));
fp.open((aResult) => {
  if (aResult == Ci.nsIFilePicker.returnOK) {
   if (fp.file.exists() && fp.file.isFile() && fp.file.isReadable()) {
    var oldfile = fp.file.path;
    var newfile = oldfile + ".json"; // output file name
    try {
      decompressFile(oldfile, newfile);
      console.log("Saved as: \"" + newfile + "\"");
    } catch (err) {console.log(err);}
   }
  } else {console.log("<canceled>");}
});

I don't know if this is the same code, but nothing happens when trying this either.

more options

andrewln627 said

After doing this and selecting the file, nothing happens and the file selection screen just closes.

Sorry, I forgot to mention, the path to the new file should be displayed in the Browser Console -- there's no popup. If that path is missing then please try cor-el's script instead.