ابحث في الدعم

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

Firefox 12 failed to restore my previous session!

  • 7 ردود
  • 48 have this problem
  • 8359 views
  • آخر ردّ كتبه GBinHoosick

more options

Hi there!

Well, last night I shut down my computer from the Start menu in Vista. I believe I had closed Firefox manually before I proceeded with the shut down. I don't think it has anything to do with the way you exit Firefox, but I'm just saying it.

I usually have several tabs open in Firefox, this time I had about 50 of them and every time I close Firefox it prompts me if I want to save the tabs. I don't think this is a default setting, I think I set this up myself. So I just click the option which saves my tabs so that the next time I start Firefox I can continue where I left off.

I believe I clicked the save button last night as well. But today I started up Firefox and the tabs were gone.

I did follow the procedure for restoring the last session as described here: https://support.mozilla.org/en-US/kb/Firefox%20does%20not%20ask%20to%20save%20tabs%20and%20windows%20on%20exit?s=Firefox+12+failed+to+restore+previous+session%21&r=1&e=es&as=s

But the thing is I don't have the option to restore last session when I go to Firefox button and History.

Also, I have started and closed Firefox since that several times. So this restore option might only just restore the last tab I closed anyway. As described...

If you close each window or tab, only the final window or tab that you closed will be available when you restart Firefox.

Why did Firefox forget to restore my tabs?...

This happened to me once before but I don't remember how I restored the tabs.

And also, it happened once that Firefox failed to prompt me if I want to save my tabs, and instead prompted me with a whole different dialog, the one where it warns me that I'm about to close all open tabs and asks me to confirm.

There was no way around it so I intentionally crashed the computer, knowing that once I log on to Windows and start Firefox again it will restore my tabs automatically whether it wants to or not. And, of course, this proved to be true, all my tabs were back.

But did I really have to crash my comptuer for this? Maybe I could have crashed only the Firefox by terminating it's process... but it works either way. One time it asks, one time it doesn't ask to save tabs. Completely disregarding the settings! There is something seriously wrong here!

After that first incident I was again able to save my tabs on exit, it always asked me to save them from that point on, as I would expect it to. Until now...

Now it asks me if I want to save my tabs, and I say yes please, just to find out the next morning it didn't restore them, as if they never were saved. Haha! LOL! Ridiculous! Haha, that Firefox 12! :) What a clown!

As mutch as this is a call for help in restoring those tabs, it is also a reminder to Firefox developers that something really stinks here! You need to work out the session save and restore mechanism in Firefox 12. Unluckily for me I had not installed the Session Manager extension. That's one tool that does better what Firefox should do by standard.

الحل المُختار

Quickly search for the file sessionstore.bak. It's a backup of your session restore history, that's made once every couple of days. Do not confuse this with the sessionstore.js file. That's the file that remembers what you have now (nothing). Then copy it to your My Documents folder. If you can't see the file extension, right-click each sessionstore file and choose Properties. Get the one with the .bak extension.

The reason for the urgency is that sessionstore.bak can be overwritten at any time causing you to lose the backup tabs. They could have changed the way this file works and now wipe it as soon as you start a new session but in the older versions this backup file was not overwritten in all cases. Also this file can be a little old but it's better than nothing.

Once you've done that, you can try to see if you can restore your tabs manually.

To do that: Go to Help > Troubleshooting Information then click the Show Folder button. A new window of your Firefox profile should appear.

Important note before next step:
Close Firefox. You can't rename files while Firefox is open.

Inside rename sessionstore.js to sessionstore.test. Leave this window open then go back to the My Documents folder and rename sessionstore.bak to sessionstore.js. Copy it over to the Profile folder window you have open.

Now you can start Firefox. Cross your fingers and see if your tabs are back.

And yes, for the record, Firefox does some weird, annoying stuff when it comes to losing tabs and restoring them. But if you personally locate and backup the sessionstore.bak (older tab history) and the sessionstore.js (always up-to-date tab history) file every few days or once a week to somewhere like My Documents, you'll be good in the event you lose all your tabs in a future freak accident.

A pain in the butt, I know. But it's better than losing all your tabs. And by backup I mean, copy & paste those files.

As you mentioned earlier it would be easier & more reliable just to use the Session Manager addon and have it save your session every few days.


Reason why tab restoring may be acting goofy:
There could be a corrupted sessionstore.js file in you Firefox profile. This can cause multiple copies of those files to be made and I guess cause the symptoms you see. Open the profile using the Show Folder button from the Troubleshooting Info page we used earlier. Now close Firefox to prevent problems with renaming files. Look for any numbered files like this: sessionstore-1.js, sessionstore-2.js, sessionstore-3.js and so on. Copy these files to My Documents. As cor-el says in the post below, look for the modified timestamp on these files that matches the timeframe you lost your tabs. Rename that file to sessionstore.js. Then restart Firefox and see if you can save tabs once again.

Read this answer in context 👍 4

All Replies (7)

more options

الحل المُختار

Quickly search for the file sessionstore.bak. It's a backup of your session restore history, that's made once every couple of days. Do not confuse this with the sessionstore.js file. That's the file that remembers what you have now (nothing). Then copy it to your My Documents folder. If you can't see the file extension, right-click each sessionstore file and choose Properties. Get the one with the .bak extension.

The reason for the urgency is that sessionstore.bak can be overwritten at any time causing you to lose the backup tabs. They could have changed the way this file works and now wipe it as soon as you start a new session but in the older versions this backup file was not overwritten in all cases. Also this file can be a little old but it's better than nothing.

Once you've done that, you can try to see if you can restore your tabs manually.

To do that: Go to Help > Troubleshooting Information then click the Show Folder button. A new window of your Firefox profile should appear.

Important note before next step:
Close Firefox. You can't rename files while Firefox is open.

Inside rename sessionstore.js to sessionstore.test. Leave this window open then go back to the My Documents folder and rename sessionstore.bak to sessionstore.js. Copy it over to the Profile folder window you have open.

Now you can start Firefox. Cross your fingers and see if your tabs are back.

And yes, for the record, Firefox does some weird, annoying stuff when it comes to losing tabs and restoring them. But if you personally locate and backup the sessionstore.bak (older tab history) and the sessionstore.js (always up-to-date tab history) file every few days or once a week to somewhere like My Documents, you'll be good in the event you lose all your tabs in a future freak accident.

A pain in the butt, I know. But it's better than losing all your tabs. And by backup I mean, copy & paste those files.

As you mentioned earlier it would be easier & more reliable just to use the Session Manager addon and have it save your session every few days.


Reason why tab restoring may be acting goofy:
There could be a corrupted sessionstore.js file in you Firefox profile. This can cause multiple copies of those files to be made and I guess cause the symptoms you see. Open the profile using the Show Folder button from the Troubleshooting Info page we used earlier. Now close Firefox to prevent problems with renaming files. Look for any numbered files like this: sessionstore-1.js, sessionstore-2.js, sessionstore-3.js and so on. Copy these files to My Documents. As cor-el says in the post below, look for the modified timestamp on these files that matches the timeframe you lost your tabs. Rename that file to sessionstore.js. Then restart Firefox and see if you can save tabs once again.

Modified by NoahSUMO

more options

The sessionstore.bak file is created at every start of Firefox as a copy of the sessionstore.js file saved in the previous session to make it possible to restore the previous session via the History menu at any time during the current session.

There may however be a numbered sessionstore-##.js present that may have that previous session, so you can check for such a file with a time stamp from around that lost session. If you find such a file then make a backup copy elsewhere and rename the file to sessionstore.js to see if that brings back that lost session. Also look in the History menu for recently closed tabs or windows.

Maybe register at Bugzilla and vote for this bug:

(please do not comment in bug reports)

Modified by cor-el

more options

...\AppData\Roaming\Mozilla\Firefox\Profiles\0m92fqnp.default

addons.sqlite

blocklist.xml

bookmarkbackups

cert8.db

cert_override.txt

chromeappsstore.sqlite

compatibility.ini

content-prefs.sqlite

cookies.sqlite

cookies.sqlite.bak

downloads.sqlite

extensions

extensions.ini

extensions.sqlite

firebug

formhistory.sqlite

key3.db

localstore.rdf

mimeTypes.rdf

minidumps

permissions.sqlite

places.sqlite

pluginreg.dat

prefs.js

search.json

search.sqlite

secmod.db

sessionstore.bak

sessionstore.js

signons.sqlite

urlclassifierkey3.txt

weave

webappsstore.sqlite

Those are the files I found in the profile folder.

You told me to copy following files:

sessionstore.bak sessionstore.js

I did so, by copying them to Desktop. Additionally I copied following two files:

cookies.sqlite.bak prefs.js

Just in case...


In the Firefox profile folder, you told me to rename sessionstore.js to sessionstore.test.

Then you told me to rename the sessionstore.bak copy to sessionstore.js and move it to the Firefox profile folder. Effectively replacing the sessionstore.test file.

I have done this and started Firefox but the only tabs that were restored was the last 3 tabs, including the default Firefox Google search page and the Troubleshooting Information tab.

Does this mean it's too late now to restore the tabs? The sessionstore.bak is already overwritten?

I will surely put my entire Firefox profile folder on a regular backup plan from now on. Thanks for the tip!

What about Shadow Copy? Can I utilize this feature to recover the lost or the old version of this file?

Exactly which one is it I need to recover, is it the BAK (sessionstore.bak) or the JS (sessionstore.js) file? I'm a little bit confused now.

I don't actually have Shadow Copy... because I am using Vista Home Premium. The Home Basic and Home Premium editions don't have the Previous Versions tab in the Properties dialog. Otherwise I would have tested this already.

But both Home Basic and Home Premium have the service Volume Shadow Copy. So technically they are Shadow Copy capable, but Microsoft doesn't allow you to use it because they have removed the Previous Versions tab from Properties dialog.

So I could try one of the third party software to utilize Shadow Copy. I'm just not sure if it will work.

Modified by Fractalogic

more options

Problem solved!

I started the Volume Shadow Copy service in Vista. I downloaded and installed the ShadowExplorer 0.8 with which I was able to export the shadow copy and thereby completely restore the entire Firefox profile folder to 6 PM yesterday. It may not have some of my tabs that I had opened since that time. But it's the best I got.

After exporting the shadow copy of my Firefox folder, I copied both the sessionstore.bak and the sessionstore.js file from it to my current Firefox profile folder and replaced the ones I had.

The old sessionstore.bak and the sessionstore.js files were 2 KB each, they are now about 700 KB and 900 KB respectively.

Initially Firefox asked me what tabs I wanted to restore. It showed the usual page that you would normally see after a Firefox crash. It just said it failed to restore my session, so I chose to restore all the tabs in the list. It restored them all successfully and now when I exit and start Firefox again my tabs are restored.

P.s. I misinformed you earlier, Firefox does not prompt me if I want to save my open tabs. That's how the old Firefox versions worked. I have set up the "When Firefox starts" parameter to "Show my windows and tabs from last time". So it's just a matter of exiting Firefox and the next time you start it it has to restore the tabs or the session. Unfortunately it doesn't work very well. I will probably be going back to Firefox 3.6.28 or install the Session Manager.

more options

Try to use "Firefox/File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") to close Firefox if you are currently doing that by clicking the close X on the title bar to make sure that Firefox closes properly.

more options

Yeah, if the tabs were not restored then unfortunately sessionstore.bak was overwritten. But you're taking it surprisingly well. :) Most people are pissed beyond belief, which is expected. :P

Also let me clear up the confusion between sessionstore.js & sessionstore.bak. Sessionstore.bak is the backup file that Firefox makes after every shutdown of Firefox. Sessionstore.js is the main file that stores all the data about tabs, app tabs and recently closed tabs & windows.

You can backup either one of these files but, like you did, it's best to check the modified timestamp on both files and most importantly their sizes. It will let you know how old that file is and the bigger the size of the file, the better. A 2kb file likely has 1 or 2 tabs, where a 500kb one has around 20 tabs or more.

But to keep it simple, just backup sessionstore.js.

And yes, great idea about Shadow Copy. I've used it on Windows 7 and it really is a life saver. I found it had around 20 or 30 backups for the places.sqlite which I was trying to recover. You could try to implement it on Vista with 3rd party software, I'd just read some reviews first.

Or you could install the Session Manager addon we both discussed earlier. Unless you think adding that add-on is overkill or you don't want to weigh down Firefox with another addon? But in this case, I think it does do what you want, which is backup your sessionstore.js everyday or every few days. I think the setting is customizable.

I'm praying for the day they create a "sessionstorebackups" folder like they have for the bookmarkbackups folder. That way we can have a better chance to recover the tabs.


Edit: You replied while I typed this. But great work! I didn't know Shadow Copy kept backups of files on Vista even though the service wasn't running. Anyway that's great news. And I see you'll be using Session Manager from now on. :D

And thanks for clearing up the part about Firefox prompting you to save your tabs at closing. I haven't seen Firefox do that in a while (the last version that showed that prompt was maybe 3.5?) so I was wondering what was going on there. :) Take care and have a good one!

Modified by NoahSUMO

more options

Thanks for sharing your solution, Fractalogic! I had the same problem: I'd closed Firefox, then attempted to re-open it, apparently before it had completely closed (even though its window had closed), since I had a very large number of tabs and tab groups open. When it eventually re-opened, the previous session didn't restore. Apparently, the incomplete closure wiped out the storage of the session.

So, I found and followed your idea and instructions for using Volume Shadow Copy, restored a version of my Firefox profile folder from a few days ago, copied and replaced the 2 sessionstore files and ..... BINGO, the session I wanted was back, with all my tabs and tab groups! And, with the added benefit of being able to use the Shadow Copy function from now on. Shadow Explorer is a very nice program!

Brilliant problem-solving on your part. I'm very grateful for it.

BTW, I see in the Shadow Explorer documentation that it utilizes System Restore. In fact, the choices for dates to restore a file to all appear to be System Restore points .... which makes sense. Given that, do you think doing a System Restore to an earlier date with intact sessionstore files, rather than using the Shadow Explorer process, also would've worked?