This is not a new problem for me - it has been going on for months and months, and I have wasted countless hours looking for a solution - so I decided to post a question on the forum, and hope for the best.
The Problem: Whenever I close Firefox, it loses my most recent tabs, and there is NO way to get them back.
Here's what I have tried:
1. I set Firefox to automatically resume my previous session at startup. ( I did this a long time ago, and have not changed it since. ) When I restart Firefox ( without modifying the sessionstore.js file first ), I get an old session with all 5 of my tab groups present, but with two of them empty.
2. Before restarting, I right-click on sessionstore.js, select Properties, click on the Previous Versions tab, click the latest Restore point, and apply. ( The latest restore point is always at least a week old. ) Now, sessionstore.js shows a size > 1000 KB. When I restart, I get the "embarassing" screen. Clicking Restore gives me exactly what was promised - the set of tab groups that I had over a week ago. This is the best I can do. It does NOT have my LATEST tabs.
3. Before closing Firefox, I copy the sessionstore.js file from my Profile folder, and save it in a seperate folder on my desktop. ( This should contain any new tabs I just opened today, no? ) Then I close Firefox. Before restarting, I copy & paste the copy of sessionstore.js that I just saved into my Profile folder. When I restart, I get exactly the same results as in #2. The tabs I just opened today are gone.
4. When I searched Mozilla support, I came across this page: https://support.mozilla.org/en-US/kb/how-do-i-rest
5. A page in Mozilla support also suggested using the plugin Session Manager. I tried this, and all it does is make it easier to go through steps #2 or #3 - the results on restarting are the same.
6. I tried writing a "Bug" to submit to the Mozilla developers, but it's way over my head!
I can't believe that this is the way things are supposed to happen. Surely other people are having the same problem!
You can check the sessionstore.js file to see if it contains your open tabs.
You can paste the code on the command line in the Browser Console (Firefox/Tools > Web Developer;Ctrl+Shift+J)
In Step 3, when you open your currently active profile folder:
All the evidence suggests to me that Firefox is not regularly creating any sessionstore files while the browser is open. And when it closes ( I've watched this in my Profile folder ), both the sessionstore files revert to a size which is a LOT less than they were before closing. So evidently, there is some kind of schedule for the creation of the backup files in Previous Versions, and it only happens about every week or so.
Hi prof611, "Previous Versions" generally are found in Windows restore points; they are not created by Firefox.
By default, sessionstore.js should be updated every 15 seconds (assuming there are changes), so the timestamp should advance continuously during your session. It sounds as though Firefox is not writing to the file.
Having the file shrink when Firefox shuts down could be partially due to removal of some session cookie information, but I don't think that should make such a dramatic difference. (I haven't tried to observe it myself.)
Have you run the experiment in Firefox's Safe Mode to check whether sessionstore.js is updated correctly with all extensions deactivated?
You can restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled
In the dialog, click "Start in Safe Mode" (not Reset)
If the sessionstore.js file doesn't have your tabs then Firefox hasn't been able to create a new sessionstore.js file.
You can check which processes have a file handle on a file with the process explorer utility.
Use Find > Find Handle to see if that file is accessed (locked) by another program.
Thank you, cor-el. I used the Process Explorer software to search for 'sessionstore', and it returned 0 results. So I then knew that another program accessing it was not the problem.
Thank you, thank you, thank you, jscher2000. Your answer solved my problem. I restarted Firefox in Safe Mode, and the problem was immediately solved. I have been watching my Profile now for almost a day, and the sessionstore.js file keeps growing in size as I add tabs. Shutting down Firefox doesn't have any deleterious effects. It restarts with all the addons activated, and resumes with the tabs that were open before closing it.
So it seems like the problem is solved, but I still have no idea what actually caused it in the first place, or how Safe Mode fixed it. However, "if it works, don't mess with it", so I'm not.
But if anybody can figure out what was really going on, please finish this thread. I'm not going to close it, because I'm curious.
Since extensions are the big ticket item, you may need to review those to see whether one of them could be blocking the normal session saving behavior. Open the Add-ons page using either:
In the left column, click Extensions. Do any pop out at you as session related? (Note that Tab Mix Plus has some kind of session feature.) You might just disable everything that isn't essential to your use of Firefox for the next 24 hours and see whether that resolves it. Finding the exact culprit could wait for a future round of testing.
Thanks jscher 2000. I guess I didn't make it clear. "It restarts with all the addons activated, and resumes with the tabs that were open before closing it." IE, it's running fine now with all the extensions activated. Everything is OK now.
So something in the Firefox code was causing the bad behavior. It's not essential that I find out what the problem was - I'm just curious. And if anybody else has this same problem, it might be nice to have it corrected at the source.