How do I restore all my tabs after Firefox crashed and the option is not available?
I admittedly have way too many tabs in one session, but haven't had too many problems with concerning losing any tabs or being unable to restore my previous session. However, Firefox froze while I was browsing and I restarted my computer and opened up Firefox and was not able to restore my previous tabs. Usually if I restart my computer without exiting Firefox, the option always is available when I reboot Firefox. I am not sure why this is suddenly not an option, but I am desperate to get these tabs back, or even just a list of what each one was instead of the actual tabs. I read about ways to do this, but some seem dated and I did not understand how to do any of them. I am not sure how to find sessionstore.bak/js, which seems to be the most recommended way of fixing this issue. I currently have Windows 10 with the latest version of Firefox as of this posting. Any help would be greatly appreciated!
- Google Update
- Intel web components updater - Installs and updates the Intel web components
- Intel web components for Intel® Identity Protection Technology
- The plugin allows you to have a better experience with Microsoft SharePoint
- The plugin allows you to have a better experience with Microsoft Lync
- Octoshape embedded video plugin
- Shockwave Flash 23.0 r0
- User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Hi, please see if this helps -
If your question is resolved by this or another answer, please take a minute to let us know. Thank you!
I managed to find Firefox appdata, but could only find a recovery.bak file and not a sessionrestore.js/bak. I am not sure how to progress from here.
I exited Firefox and went into the appdata in the Profile folder and renamed sessionstore.js to sessionstore.old. I then put the recovery.bak file into the folder and renamed it sessionstore.js. I booted up Firefox and I was able to restore my previous session in which I was just using, not the one I had with all the tabs. I also found a recovery.bak file in Recuva and did the same thing with that file and the same thing happened. I am not sure what to do next.
After multiple restarts, your options are diminished...
The kinds of files you may find in the sessionstore-backups folder are:
- recovery.js: the windows and tabs in your currently live Firefox session (or, if Firefox crashed at the last shutdown and is still 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
Could you take a look at what you have and the date/time of the various files to see whether you think any of them would have the missing tabs?
Note: By default, Windows hides the .js extension. To ensure that you are looking at the files I mentioned, you may want to turn off that feature. This article has the steps: http://windows.microsoft.com/en-us/windows/show-hide-file-name-extensions
I have a copy of the recovery.bak file I saved to documents about a half hour after I realized I could not restore my tabs, but when I scroll over it, it says it was last modified after the crash. I also found two recovery.bak files in Recuva, one from the 13th and one from the 11th. I saved both to my desktop. I tried the same technique with the file from the 13th as I did with the original recovery.bak file I found, and the result was the same and it now says it was last modified about an hour ago. I don't want to try experimenting around again and ruin any chance I have at recovering them. Also, if there is a way just to view a text file of all the URLs I had from the date, I would be fine with that as well. Thanks!
Hi Russ, what about the other files?
Here is a procedure to extract a list of URLs out of a session history file, assuming its data structure is not corrupted. You can load the file into a Firefox tab and run a script against it.
(0) Install the "Session Extractor" bookmarklet from:
Do not click the blue button! See the instructions in the top bar of the page for how to install it.
To extract the file:
(1) Create a copy of the session history file you want to mine for URLs and change the .js or .bak extension of the copy to a .txt extension. To do that:
Make sure Windows is showing .js and .txt extensions. If you need to turn that on, see http://windows.microsoft.com/en-us/wi.../show-hide-file-name-extensions or http://support.microsoft.com/kb/865219.
Working in a safe backup folder -- a place Firefox will not overwrite the file -- right-click the file you want to investigate and click Copy. Then right-click a blank area and choose Paste. Right-click the copy and Rename with a .txt extension.
(2) Open that .txt file in a Firefox tab. Either drag the renamed file and drop it on an existing page to load the txt file in its place, or right-click the file and choose Open With and use Firefox.
(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.
Unfortunately, if you want to save the page as is, 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 HTML.
I cannot seem to find any of the files. I can only find recovery.bak. Is there nothing I can do with only the recovery.bak files?
You can look in the recovery.bak file, but it's usually not created much earlier than the main recovery.js file during the same session.
You don't have any of the other files I mentioned?
Is it possible you have additional profile folders? For example:
(1) If the Refresh feature runs, it moves your old profile folder to the desktop inside an Old Firefox Data folder
(2) If a profile is locked and you have to create a new one, you can find the old profile folder under
I think you already looked there, but is there more than one folder there?
Those files are there, but I have restarted Firefox since the crash, so I am not sure they would be referring to the session before the crash, but rather the session I had earlier before I restarted Firefox. Also, when I convert it into a text file and click the bookmarklet, it just shows a screen full of black diamonds with white question marks inside of them. Not sure what I did wrong there.
Whoops, the diamonds indicate a character set mismatch. Perhaps it would work better with a .json extension on the file instead of a .txt extension?
Changing it to that doesn't let me move it over to Firefox, also says it cannot be open. Is there anything I can do with only the recovery.bak file to restore anything?
I think you already tried the most obvious thing to do with recovery.bak, which was to "swap" it for the sessionstore.js file while Firefox is closed so Firefox finds it at startup. To review the steps:
To try swapping in a session history file from your backup folder so Firefox will load it, the standard "manual swap" method is as follows (assuming Firefox is still running):
(1) From inside Firefox, open your current Firefox settings (AKA Firefox profile) folder using either
- "3-bar" menu button > "?" button > Troubleshooting Information
- (menu bar) Help > Troubleshooting Information
- type or paste about:support in the address bar and press Enter
In the first table on the page, click the "Show Folder" button. This should launch a Windows Explorer window listing the various files and folders in your profile.
(2) Leaving that window open, switch back to Firefox and Exit, either:
- "3-bar" menu button > "power" button
- (menu bar) File > Exit
Pause while Firefox finishes its cleanup -- these changes should occur:
- recovery.js is moved from the sessionstore-backups folder to the main level of the profile folder and renamed to sessionstore.js
- recovery.bak is deleted from sessionstore-backups
(3) Once Firefox has stopped updating things, while viewing the main level of the profile folder, rename sessionstore.js to sessionstore.old
(4) Copy in the other file you want to restore [recovery.bak], and rename it to sessionstore.js -- after the rename, Windows should show it right next to sessionstore.old in alphabetical order
(5) Start Firefox and it should read the swapped in sessionstore.js and restore whatever was in the substitute file; if you do not have Firefox set to restore your previous windows and tabs automatically, use History > Restore Previous Session
Changing it to that doesn't let me move it over to Firefox, also says it cannot be open.
You still should be able to drop a .json file into an open Firefox tab and have Firefox read it, even if Windows has no idea what to do with the file.
That just restored my session to what I was viewing earlier today and not my tabs from 10/11, the date on the recovery.bak file. Also, I can't seem to get Firefox to read the json file...there is also an IE emblem on the .json file in the folder now for some reason.
I got Firefox to add the .json file to a new tab, but when I used the bookmarker tool, it said this error message: T here was an error in the structure of the session history data:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
I can't seem to get Firefox to read the json file...there is also an IE emblem on the .json file in the folder now for some reason.
Don't worry about the file icon. What happens when you try to open the file in Firefox?
It seems we are stuck: you cannot extract a readable list of URLs from recovery.bak/txt file, and swapping it for sessionstore.js doesn't take you back to what you expected.
One other things you might try to view the contents of your recovery.bak renamed to recovery.json file is to view it in the Scratchpad as follows:
(1) Copy that file to your desktop or some convenient location, for reasons that will be apparent in a moment
(2) Open Firefox's Scratchpad tool using either:
- "3-bar" menu button > Developer > Scratchpad
- (menu bar) Tools > Web Developer > Scratchpad
On the top bar of the Scratchpad window, click Open File, then use the file browser to find the recovery.json file wherever you copied it
That may take several moments to load if it's a large file.
(3) Then on the top bar of the Scratchpad, click Pretty Print to re-lay-out the file in a more readable way. Assuming that works, you'll see "entries" numerous times, with a list of one or more addresses for that tab. (Example screen shot attached.)
Hopefully you can assess whether your missing tabs are here. You either can copy/paste these URLs to Firefox's address bar to open them.
You don't need to save the "pretty" version unless you find the format helpful for reference.
I got Firefox to add the .json file to a new tab, but when I used the bookmarker tool, it said this error message: There was an error in the structure of the session history data:
SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data
Hmm, Line 1 Column 1 is the beginning. Is the file blank??
Yes, the screen is blank on that tab. Also uploading it to Scratchbook resulted in several unresponsive script messages to pop up, I pressed continue and waited, but nothing appeared in Scratchbook.
I think the file got corrupted somewhere along the way. Usually just changing the file extension doesn't cause any damage, but anything restored by Recuva is a bit of a crapshoot.
One other place to look for old versions of sessionstore.js, recovery.js, recovery.bak, previous.js, or upgrade.js-buildid files would be in a Windows restore point, typically created during Windows updates. On Windows 10, the easiest way to check whether there are older versions available there would be this tool:
It seems as though I only have one restore point: one from earlier today, so that wouldn't help with the tabs that I lost earlier. Am I pretty much out of things to try?