Search Support

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 crashed, and didnt give me the option to restore my previous session.

  • 7 replies
  • 2 have this problem
  • 14 views
  • Last reply by Tombstone00

more options

Hello,

Ive been using firefox for a while now, and until now, ive never experienced a problem like this.

Firefox crashed last night while i was asleep, and when i woke up this morning to turn it back on, the crash reporter asked me if i wanted to restart firefox, i did so, however when it loaded, rather than asking if i wanted to restore my previous session, it loaded a blank page which had an unusual looking blank patch at the top where the tabs bar is supposed to be, with the tabs loading below it.

The tabs i had loaded were all very important to me, and i would like to find a way to restore them if possible, however i have been unable to find anything on the other help pages that describes of fixes my problem.

Please help if you are able, it would be greatly appreciated.

P.S. I apologize for not including an image of the buggy window, it didnt occur to me to take a screenshot before i closed it.

Hello, Ive been using firefox for a while now, and until now, ive never experienced a problem like this. Firefox crashed last night while i was asleep, and when i woke up this morning to turn it back on, the crash reporter asked me if i wanted to restart firefox, i did so, however when it loaded, rather than asking if i wanted to restore my previous session, it loaded a blank page which had an unusual looking blank patch at the top where the tabs bar is supposed to be, with the tabs loading below it. The tabs i had loaded were all very important to me, and i would like to find a way to restore them if possible, however i have been unable to find anything on the other help pages that describes of fixes my problem. Please help if you are able, it would be greatly appreciated. P.S. I apologize for not including an image of the buggy window, it didnt occur to me to take a screenshot before i closed it.

Chosen solution

sessionstore.bak files are no longer used in current Firefox releases, so they are probably from a long time ago (Sep 2014: 20140923175406) and may not be of use anymore.


A possible way to inspect a sessionstore.js file or a file in the sessionstore-backups folder is opening the file in a Firefox tab and evaluate this JavaScript code in the Web Console (Firefox/Tools > Web Developer).

Paste the code in the command line of the Web Console and press the Enter key to evaluate the code.

eval("ss = "+document.body.innerHTML.replace("<pre>","").replace("</pre>",""));
sd='';
for (var i = 0; i < ss.windows[0].tabs.length; i++) {
 var ent = ss.windows[0].tabs[i].entries;
 var last = ent[ent.length-1];
 sd+="["+(i+1)+"]:"+"<a href="+last.url+">"+last.url+"</a><br />";
}
document.body.innerHTML=sd;

See also Emergency Firefox Session Restore:

(this website is no longer available)

Read this answer in context 👍 1

All Replies (7)

more options

Don't close Firefox. If you already closed it, do not start it again.

Use the steps in this article to find your profile folder (copy/paste the link to another browser if Firefox is closed): Profiles - Where Firefox stores your bookmarks, passwords and other user data.

In your profile folder:

(1) If Firefox closed normally: Find sessionstore.js and save it to a safe location such as your Documents folder.

(2) All cases: Scroll down and double-click into the sessionstore-backups folder. Save all files here to a safe location, such as your Documents folder.

If not too much time has passed, we may be able to use them to recover your lost tabs.

What did you find? The kinds of files you may find among your sessionstore files are:

  • sessionstore.js: the windows and tabs from your previous normally closed session
  • recovery.js: the windows and tabs in your currently live Firefox session (or, if Firefox is closed, your last session)
  • recovery.bak: a backup copy of recovery.js
  • previous.js: the windows and tabs in your last Firefox session
  • upgrade.js-build_id: the windows and tabs in the Firefox session that was live at the time of your last update

(If you see sessionstore.bak, it's probably very old as Firefox no longer creates that file)

more options
more options

Sorry, Cor-el, but I don't use time machine, my computer doesn't have enough space on the drive for it to run properly.

and jscher2000, ive found the folders in question, but im not sure what to do with them to get my session back, could you explain what i need to do?

i had already restarted firefox after the buggy window came up, so i would imagine the session in question is previous.js, however the most recent upgrade.js was on the 25th, so it might also work, as the tabs in question have been open for a while.

i guess my current question would be, how do i use these .js files to restore my previous session?

more options

Once you have close and restart Firefox then the previous.js file will be overwritten, but as long as you haven't done this then you might be able to restore the session in the file.

You can backup the session files in the sessionstore-backups folder in the Firefox Profile Folder to make sure not to lose possible important session data. You can find these files in the sessionstore-backups folder:

previous.js (cleanBackup: copy of sessionstore.js from previous session that was loaded successfully)
recovery.js (latest version of the sessionstore written during runtime)
recovery.bak (previous version of the sessionstore written during runtime)
upgrade.js-<build_id> (backup created during an upgrade of Firefox)

You can copy a file from the sessionstore-backups folder to the main profile and rename the file to sessionstore.js to replace the current file (make a backup copy of the current sessionstore.js). You need to do the latter with the Firefox application closed. You can and should backup the files in the sessionstore-backups folder without closing Firefox (i.e. do this in the current state) if you haven't created this backup already.

more options

Alright, so I've created a backup of the backups, but I couldn't find a file named sessionstore.js in the profiles folder by itself, though there were two named sessionstore.bak and sessionstore.bak-20140923175406 respectively.

a moment ago i changed the name of the most recent upgrade.js to sessionstore.js and moved it into the profiles folder, while firefox was closed, then reopened firefox, but the session hadn't changed from what it was. I've since undone these changes, as i would imagine they would only complicate things later if i didn't.

I'm probably doing something wrong, could you try to explain what I need to do in slightly more detail?

more options

Chosen Solution

sessionstore.bak files are no longer used in current Firefox releases, so they are probably from a long time ago (Sep 2014: 20140923175406) and may not be of use anymore.


A possible way to inspect a sessionstore.js file or a file in the sessionstore-backups folder is opening the file in a Firefox tab and evaluate this JavaScript code in the Web Console (Firefox/Tools > Web Developer).

Paste the code in the command line of the Web Console and press the Enter key to evaluate the code.

eval("ss = "+document.body.innerHTML.replace("<pre>","").replace("</pre>",""));
sd='';
for (var i = 0; i < ss.windows[0].tabs.length; i++) {
 var ent = ss.windows[0].tabs[i].entries;
 var last = ent[ent.length-1];
 sd+="["+(i+1)+"]:"+"<a href="+last.url+">"+last.url+"</a><br />";
}
document.body.innerHTML=sd;

See also Emergency Firefox Session Restore:

(this website is no longer available)

Modified by cor-el

more options

Alrighty then, I think that's actually given me what I needed to make this work.

I'm a novice when it comes to coding, so I couldn't evaluate the javascript myself, but I was able to use the website you listed to bring up the tabs that'd been saved in the most recent upgrade.js, which seems to have been recent enough to have retained most of the tabs I was trying to retrieve.

Thank you so much for all you've done, I really cant thank you enough for all your help, I never would've figured out any of this without your guidance.