Trying to restore a session within a session from backup file manually
My power died recently, after which I opened Firefox, expecting to be greeted with the about:sessionrestore page but it was just a blank white page for some reason. The tab name still had "about:sessionrestore" but it was just blank, no window to select and restore. I backed up the sessionstore-backups folder and found the session I need to restore (recovery.jsonlz4). I dunno why, when I uncompressed that file, it saved that broken session as well. So the file looks like {Session with broken about:sessionrestore page -> Broken about:sessionrestore tab -> Session I want -> Tabs I want}
Is there any way to manually restore this nested session? I attached some images to help clarify. I don't really know how to work with json files, I'm using a freeware viewer to read the uncompressed session file. Thanks for any help.
Toutes les réponses (3)
You may have corrupt sessionstore [v56] sessionstore.jsonlz4 file(s). Delete all sessionstore* files and the sessionstore-backups folder.
Don't delete the files if you need to rescue any data from them, just move them out of the profile folder to some location where Firefox doesn't look for them. You can try to read out their contents using this tool: https://www.jeffersonscher.com/res/scrounger.html
Type about:support<enter> in the address bar.
Under the page logo on the left side, you will see Application Basics. Under this find Profile Folder. To its right press the button Show Folder. This will open your file browser to the current Firefox profile. Now Close Firefox.
Windows: Show Folder; Linux: Open Directory; Mac: Show in Finder
Linux: Under the page logo on the left side, you will see Application Basics. Under this find Profile Directory. To its right press the button Open Directory.
Locate the above file. Then rename or delete it. Restart Firefox.
@FredMcD
I'm not sure you actually read my post completely. I am already past the steps you described. I have the session file backed up already and it is readable. What I want to do is edit the .json file so that FF reads the inner session instead of the corrupted outer layer. Trying to restore it as it currently is makes the blank about:sessionrestore come up every time.
Modifié le
One of the options on the Scrounger page is to save out the first embedded session found in the JSON. Is that button enabled? If not, perhaps my code isn't detecting it correctly, or maybe due to lack of regular testing it no longer works:
Manual Extraction
If you viewing your JSON file in a Firefox tab, you could switch to the "Raw" view and try running this in the web console (Ctrl+Shift+K). Since I don't have immediate access to a file like yours, I don't know whether it will work:
// First, you need to be in the "Raw" tab of the Fx JSON viewer // Find the JSON content var s = document.querySelector('#rawdata-panel div.panelContent pre.data'); // Extact the content and work with it as a JSON object var s1 = JSON.parse(s.textContent); // Identify the object property containing the embedded session var s0 = s1.windows[0].tabs[0].formdata.id.sessionData; // Pop up a prompt with the JSON text of the embedded session prompt('Extracted', JSON.stringify(s0));
If the code is very long a prompt window isn't going to be large enough and you may need to dump it out somewhere else.