sessionstore file consists only of closed windows, won't open
Yesterday I had an event in which, due to some combination of computer glitch and user error, my Firefox window was closed and then Firefox was shut down in a two-step process. This left me with a sessionstore.jsonlz4 file consisting of no open tabs but with an enormous closed window full of tabs. I've used this utility to verify the contents of my sessionstore file.
I know how to rescue a previous session's tabs according to these instructions. I've done it many times. However, this time I'm finding that the only way to access Recently Closed Windows seems to be to first Restore Previous Session, and the only way to Restore Previous Session seems to be to have at least one tab in the sessionstore file that is not in a closed window. Therefore, I cannot access the tabs in my sessionstore file.
The best solution I can think of would be to edit my sessionstore file so that it contains at least one tab that is not closed. This would allow me to Restore Previous Session, and then find the tabs I want under Recently Closed Windows. However, I do not know how to edit a sessionstore file.
Specs: MacOS Monterey 12.6.9 Firefox 121.0
Összes válasz (6)
Maybe create a blank session file with only one tab and copy the closed _closedWindows and closedTabs to this file.
I posted code to run in the Browser Console to save and restore a sessionstore file, either compressed or not compressed.
- /questions/1417201 Increase Sessionstore Files or Backup times?
cor-el said
Maybe create a blank session file with only one tab and copy the closed _closedWindows... to this file.
Yes, my problem would be solved if I knew how to do this. Would you please give me more explicit instructions?
What happens if you try to restore this sessionstore file via the Browser Console like posted in the question I linked above (/questions/1417201) ?
My Browser Console does not include a command line. The instructions for turning it on start with finding the Developer Tools Settings. The instructions for doing that appear to be out of date. I do not see an "ellipsis on the right of the tab," and I do not see any of the symbols that appear in the accompanying figure.
As I mentioned, I'm running Firefox 121.0 on MacOS Monterey 12.6.9
You can open any of the developer tools like the Inspector (Ctrl+Shift+C) or Web Console (Ctrl+Shift+K) and press F1 to go to the settings page.
Okay, I have solved the problem. Here is my report: 1) The necessary step before I can follow this instruction and turn on Developer Tools Settings is to click on the three bars at the far-right of my browser, then choose "More tools" and then choose "Web Developer Tools." 2) Once that's done, the palette of developer tools appears as described. However, I do not see the option "Enable chrome debugging as described here. Instead, I checked the box next to "Enable browser chrome and add-on debugging toolboxes," and then the command line appeared at the bottom of the Browser Console. Huzzah! 3) Once I have a command line in the Browser Console, I can execute the following code, which user:cor-el had posted here: /* Restore Session data from .json or .jsonlz4 */ async function readFile(aFile){
var ssj = await IOUtils.readUTF8(aFile, /lz4$/.test(aFile) ? {decompress:true} : {decompress:false}); SessionStore.setBrowserState(ssj);
}
var fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker); fp.init(window, "Open File - Load Session", Ci.nsIFilePicker.modeOpen); fp.appendFilter("JSON/JSONLZ4", "*.*json*"); fp.open(aResult => {
if (aResult == Ci.nsIFilePicker.returnOK) { try { readFile(fp.file.path); alert("Session Restored:\n" + fp.file.path); } catch (err) {alert(err);} } else {alert("CANCELED");}
});
This then caused a dialog box to open, in which I could choose a file. Contrary to the comment above, the option of a jsonlz4 file was grayed out. However, I was able to use this tool to convert my jsonlz4 file to uncompressed JSON (a js file). Then I reran the code above, and was able to choose the js file when the dialog box appeared.
Once I did this, the closed window containing my tabs became available in History > Recently Closed Windows.
Thank you, cor-el, for you rhelp.