Restore Tabs Not Working Right/Glitch
Hi,
So My PC crashed a couple days ago and It didn't auto update my previous tabs. This isn's a problem in and of itself because I keep a backup of the recovery.js and sessionstore.js elsewhere. So I replaced both but it just isn't working. I went in and changed the option to "Show your windows and tabs from last time" but it only opens either a blank white tab or (even weirder) it'll open my LATEST session. By which I mean I have several mozilla support tabs open. It'll open that session to spite me replacing both the session and recov files. I don't even know where it's storing those since I thought those were the only two files that'd be used. Any help would be appreciated since I'm well ans truly stuck (I can tell they are my back up files because I had a tonne of files open during last recovery so the file sizes are conspicuously different.
Thanks for any help DO
Saafara biñ tànn
Duplication of URLs is not unusual.
Depending on how broken the layout is, this script might be useful. It's a variation of the Session Extractor that doesn't depend on a valid JSON structure, but does expect data to follow the same descriptors (e.g., "tabs":[ for an array of tabs, "url":" for a page URL).
https://gist.github.com/jscher2000/9623b34ed793274396ac04b81cb81660
It also shows all the closed tabs and closed windows it finds.
I haven't cleaned this up to run as a bookmarklet, so you have to paste it into the command line at the bottom of the Web Console and press Enter to run it. To open the Web Console in the lower part of the tab below your recovery.json/recovery.txt file, you can use either:
- Ctrl+Shift+k
- "3-bar" menu button > Developer > Web Console
- (menu bar) Tools > Web Developer > Web Console
All Replies (8)
When Firefox shuts down normally, the contents of recovery.js are saved in the main level of the profile folder as sessionstore.js. In order to have Firefox use files in the sessionstore-backups folder at startup, you first need to hide (remove or rename) the sessionstore.js file.
Hi,
Thanks for the reply. The problem is I have replaced both files with my saved backups (which are the same as each other only renamed) but it isn't restoring from them/either. IT's only restoring the new tabs. it's like firefox is adding the new session to the other one nd only restoring the new one. my backups are 30.5MB but the ones in the Mozilla folder are now 31.2MB is you see what I mean
30 megabytes seems rather large. Mine are about 1.5 megabytes with 54 open tabs, and I've set Firefox to remember more closed windows and tabs than the default number. Perhaps I'm just keeping far fewer tabs open than you are, or perhaps your backup file is corrupted.
I'm going offline, so I'll paste "Plan B" in case you aren't able to get Firefox to use an older session history file:
Extract the URLs from the old file as clickable links
This is a useful approach when you need to examine a number of files and you don't want to lose your current session, or just want to keep documentation.
One-time Setup:
(0) Install the "Session Extractor" bookmarklet (see the instructions in the top bar of the page for how to install it):
https://www.jeffersonscher.com/res/sumomarklets.html#SessExtr
To Extract the URLs:
In the folder where you have backup copies of your session history files:
(1) Create a copy of the session history file you want to mine for URLs and rename it with a .json extension.
For example, right-click the recovery.js file, choose Copy, then right-click a blank area of the list and choose Paste.
Note: By default, Windows hides the .js extension. This is all easier if you can see it. https://www.bleepingcomputer.com/tutorials/how-to-show-file-extensions-in-windows/
Right-click > Rename the recovery - Copy.js file to recovery.json (or recovery.txt if you prefer).
(2) Open the recovery.json file in a Firefox tab. Either drag the renamed file and drop it on an existing page to load the json/txt file in its place, or right-click the file and choose Open With and use Firefox.
Large files will take a long time...
(3) In the tab displaying the session history file, click the bookmarklet button to run the script. This should generate a new page listing the URLs of each open tab from the file. You can select and copy this list and paste it somewhere for safekeeping, and/or you can just use the links now.
Unfortunately, if you want to save that page "as is" (as an HTML page), there's an extra step: press Ctrl+U to launch the "view source" page, and save that as a .htm or .html file. For some reason, saving the original page gives you the original session file instead of the formatted list of links.
Hi,
So I tried that and, while I did get a better view at the contents of the file the actual extraction didn't take:
Session Contents Window 1 Tab 1
[Title Not Available] file:///C:/Users/******/dwhelper/sessionstore.txt
← Back (earlier pages visited in this tab):
[Title Not Available] file:///C:/Users/******/dwhelper/recovery.txt
[Title Not Available] file:///C:/Users/******/dwhelper/recovery.json
[Title Not Available] file:///C:/Users/******/dwhelper/sessionstore.txt
Restore previous session - Configure when Firefox shows your most recent tabs and windows | Firefox Help https://support.mozilla.org/en-US/kb/restore-previous-session
firefox wont restore tabs just opens blank tab - Google Search https://www.google.ie/search?q=firefox+wont+restore+tabs+just+opens+blank+tab&ie=utf-8&oe=utf-8&client=firefox-b&gws_rd=cr&ei=nyFFWZ_mIaSPgAbXqrzICA Tab 2
Bookmarklets for Mozilla Support Posts https://www.jeffersonscher.com/res/sumomarklets.html
I think maybe there's a formatting error in it where it can't read the extra lines with all my original tabs. Could someone post what the standard beginning of the recovery/sessionstore file should be so I can copy/paste it into the file then my data after it?
(EG "{"version":["sessionrestore",1],"windows":[{"tabs":[" etc)
Thanks
DorianOtten moo ko soppali ci
Yes, mine starts off:
{"version":["sessionrestore",1],"windows":[{"tabs":[{"entries":[ ...
entries is the collection of tabs for the first window.
I'm not sure why the extractor stopped party way through your file, except that it intentionally skips closed windows and tabs. Does your History menu show any closed windows and tabs you can re-open?
Another thing you could try is to open the recovery.json file in Firefox's "Scratchpad" tool. There is a button called Pretty Print which will restructure a JSON-format file in a more visible/understandable way.
https://developer.mozilla.org/docs/Tools/Scratchpad
You don't need to save the "pretty" version when you close the Scratchpad unless you want to keep it for future reference.
Thanks but that doesn't seem to work either. MAybe the files are corrupted since, as you said, they are far bigger than they should be for the 60ish tabs that are saved on them . I've just started going through them with the session extractor and copy-pasting them to new tabs and I've noticed a LOT of duplicates. Could there be some king of data bloat in them? Might it also be that some where a bracket got lost and threw the whole format off?
Or maybe not lol.... The way it's laid out it contains every bit of code from each page so my plan to go through this block of text looking for "www." seems a lot less viable
DorianOtten moo ko soppali ci
Saafara yiñ Tànn
Duplication of URLs is not unusual.
Depending on how broken the layout is, this script might be useful. It's a variation of the Session Extractor that doesn't depend on a valid JSON structure, but does expect data to follow the same descriptors (e.g., "tabs":[ for an array of tabs, "url":" for a page URL).
https://gist.github.com/jscher2000/9623b34ed793274396ac04b81cb81660
It also shows all the closed tabs and closed windows it finds.
I haven't cleaned this up to run as a bookmarklet, so you have to paste it into the command line at the bottom of the Web Console and press Enter to run it. To open the Web Console in the lower part of the tab below your recovery.json/recovery.txt file, you can use either:
- Ctrl+Shift+k
- "3-bar" menu button > Developer > Web Console
- (menu bar) Tools > Web Developer > Web Console
HA. That worked! that's amazing man I really appreciate all the help. It might be best if I open these again and let the session save as a new file since the back up has something messed up going on.
Cheers for all the help
Also if I'm reading this right it was reading all my original tabs as the same tab; as just tab 1 and why I was finding so many "www"s is because it also saved every web address that each of those tabs had previously been to
DorianOtten moo ko soppali ci