Quantcast

How to Recover Your Firefox Session When All Hope is Lost

Last week my house had some electrical issues, and our landlord came round to take a look at things. During this time, my computer got turned off without warning when a fuse was removed. It recovered fine, but next time I went to shut down in a hurry, Firefox was hanging around, and I wanted it dead. I chose to kill it and shut down—a mistake I would soon regret.

When the fuse and power were restored and my machine booted up again, I opened Firefox. It asked to do a session restore, as it had closed down with an error. That’s fine, no problem; I did force quit and the restore has always worked. Not this time. It DID load all my open tabs, probably about 100-130 or so… every single one of them… blank, with no URL. I don’t have all those tabs open at once, but in one session—most of which is stored in Firefox’s grouped tabs feature.

Many hours had gone into collecting those tabs. Several of them were tabs of projects put on pause, a few article resources, plans for future projects, random research and reading I wanted to finish at some time. All lost. I was under the false impression that Firefox by default stored several sessions, but sadly it does not. This can be achieved with a plugin which I’ll get to later.

I had a frantic panic and it took about half an hour to sink in that I’d probably never see those tabs again. Because I’d spent so many hours gathering them, however, I decided I’d try and get them back, somehow. I figured the data must be stored somewhere, and maybe Firefox just wasn’t loading the URLs because the file was corrupt.

After a bit of poking around and Googling, I found the profile data is stored in the appdata folder (%APPDATA%\Roaming\Mozilla\Firefox\Profiles\[RandomNumber]) on Windows (you may or may not have the “Roaming” folder). If you’re a Mac user, you should find the profile data at ~/Library/Mozilla/Firefox/Profiles/ or ~/Library/Application Support/Firefox/Profiles/. The files you’ll be looking for is sessionstore.js and sessionstore.bak. Firefox automatically creates a backup encase of crashes, but if like me, you opened and closed Firefox several times before realising this, you will have overwritten both these files several times.

At this point, I almost gave up. I figured the chances of recovering the session data file was pretty low. Having successfully used file-recovery software before, I decided to give it a shot. On Windows I use Recuva, made by the same people as CCleaner, and it’s free. If you’re on a Mac and you don’t have Time Machine or (for whatever reason) don’t have any form of backup enabled, you can have a look at some Mac-based alternatives.

Now I knew what file I was looking for, where it was, and how to recover it. Because of the way the NTFS file system works on Windows, when you delete a file (from the recycle bin), you actually just delete the index to the file, allowing that space to be reused. Recuva knows this, and searches for un-indexed files on the drive. It sometimes only recovers partial files, but I was lucky enough to find a completely untouched version of my sessions file.

After the file was recovered, I moved it to the correct location and re-opened Firefox. JOY! After the huge worry, I decided to installed Session Manager, a Firefox plugin which allows some clever session management features, like backing up x number of previous sessions, something I thought was already in place.

If you have had a similar horrible Firefox (or other browser-related) experience, let us know in the comments below.

This entry was posted in Browsers, HowTo, Internet and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

177 Comments

  1. JUSTGARY
    Posted 26/06/2012 at 9:38 PM | Permalink

    I RAN INTO A SIMILIAR PROBLEM AFTER RUNNING CCLEANER…

    I JUST RAN CCLEANER ABOUT AN HOUR AGO AND UNFORTUNATELY IT DELETED MY SESSIONSTORE.JS FILE FOR FIREFOX WHICH OF COURSE KEEPS THE INFORMATION ON ALL THE TABS I HAD OPEN (20 TO BE EXACT )WITH FIREFOX…

    SO I STOPPED EVERYTHING I WAS DOING.. I CLOSED FIREFOX.. OPENED GOOGLE CHROME AND DID A SEARCH FOR A WINDOWS VISTA FILE UNDELETE PROGRAM…

    FIRST PROGRAM I TRIED WAS SHADOW EXPLORER WHICH WAS HIGHLY RECOMENDED AT ONE WEB SITE.. WELL IT DID NOTHING AND I MEAN NOTHING.. IT STARTED UP AND JUST SAT THERE.. I FIDDLED WITH IT FOR A LITTLE BIT THEN GAVE UP..

    I THEN TRIED PANDORA RECOVERY. IT STARTED UP SHOWED A BUNCH OF DELETED FILES BUT NOT SESSIONSTORE.JS..
    THERE IS A FILE SEARCH OPTION SO I TYPED IN *.JS IN THE SEARCH BOX.. PANDORA CAME BACK WITH A LONG LIST OF .JS FILES. I WAS WORRIED AT FIRST BECAUSE AS I STARTED TO SCROLL DOWN THE LONG LIST I DID NOT SEE SESSIONSTORE.JS. BUT AS I GOT TO THE BOTTOM THERE IT WAS SESSIONSTORE.JS AT 518KB..

    SO I CLICKED ON IT AND SAID RESTORE.. IT RECOMMENDED THAT I NOT RESTORE IT TO C:\ WHICH I HAD CHOSEN BUT TO ANOTHER PARTITION IF POSSIBLE. I HAVE A D:\ RECOVERY PARTITION THAT HP SETUP SO I PLACED IT THERE..

    I WENT TO DRIVE D:\, HIGHLIGHTED THE 518KB SESSIONSTORE.JS FILE CLICKED COPY THEN I WENT TO THE DIRECTORY WHERE FIREFOX KEEPS SESSIONSTORE.JS WHICH IS
    C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\…

    I CLICKED IN THE FILE AREA AND SELECTED PASTE AND LOW AND BEHOLD I GOT AN WEIRD ERROR MESSAGE.. I CLOSED THE ERROR BOX.. I THEN SELECTED THE SESSIONSTORE.JS 1 KB FILE THAT WAS ALREADY LOCATED THERE AND CLICKED DELETE..

    I THEN CHOSE PASTE AGAIN AND THIS TIME IT WORKED MY 518KB SESSIONSTORE.JS WAS BACK… I CLOSED ALL THE PROGRAMS I HAD RUNNING THEN KEPT MY FINGERS CROSSED WHILE I CLICKED ON MY FIREFOX ICON..

    THEN, BING BAM BOOM ALL MY TABS POPPED UP ACROSS THE TOP OF FIREFOX AND IT LOADED UP MY TABS.. EVERY TAB CAME BACK 100%…

    THE ABOVE WORKED FOR ME 100%!!!!!!!!!

    HOPE IT WILL WORK FOR YOU…

    • Dodger
      Posted 13/12/2012 at 6:34 PM | Permalink

      Gary also clearly has had the caps-lock permanently fused and the full stop replaced with an ellipsis, due to his terrible debacle.

    • Jason4
      Posted 31/12/2013 at 11:13 AM | Permalink

      Thanks Ben. You don’t realize how glad I am to have found your post. I’m so relieved that it DID work. Phew!

      Also, JUSTGARY, your comment was helpful too, thank you.

  2. Ted
    Posted 07/07/2012 at 6:29 PM | Permalink

    Nothing works

  3. latooots
    Posted 18/09/2012 at 1:36 PM | Permalink

    i had the exact same problem. i noticed that my session was lost too late and almost gave up. but then i thought those 60 tabs i had open were too many to remember and so i set out to recover the sessionstore file. but the file recovery tool i used cant find a recoverable one, luckily while searching for random people who also got their sessionstore wiped i found this site.

    i used Recuva and luckily got an excellent copy of sessionstore.bak

    tried renaming to .js but FF just replaces it with a blank one. installed Session Manager hoping it would figure out the .bak file as a session properly. didn’t work.

    fiddled a bit with the file, found out it was JSON format, used Notepad++ to make it easier to see the tree, copied the important bits (the ones under window) to a clean sessionstore.js, restarted firefox and viola! Session store detected the .bak and the new one so i instantly got all my tabs back.

    thanks a lot mate! :D

    • Eric
      Posted 11/07/2013 at 8:03 AM | Permalink

      It appears I am having the same problem.

      I have a .bak sitting in the Profiles folder. I also restored a previously deleted .js. Neither file worked.

      May I ask which lines you have to delete to make it a valid .js file which FF 22.0 can understand?

  4. John
    Posted 18/10/2012 at 11:05 AM | Permalink

    Thank you so much Ben! You saved my tabs AND myself from despair! I owe you one mate.

  5. Curtis
    Posted 21/10/2012 at 9:02 PM | Permalink

    Thanks so much, Ben! You saved my tabs and myself from despair as well!

  6. Lauren
    Posted 09/11/2012 at 10:34 PM | Permalink

    I perfectly recovered sessionstore.bak and sessionstore.js with Recuva, I copy-pasted them into their right place, I did everything right, but when I try to open sessionstore.js I get

    Line: 1
    Char: 11
    Error: Expected ‘;’
    Code: 800A03EC
    Source: Microsoft JScript compilation error

    What’s wrong?

  7. Posted 17/11/2012 at 1:52 AM | Permalink

    I lost everything somehow when Firefox closed down and when I rebooted there was nothing.

    No history, no restore option – just back to square one with the browser button and one tab open.

    Anyone with expertise I can hire to get sessions back that I had running. This happened a day ago and I have opened and closed many tabs.

    Leave message here with how to contact you.

    Thanks

    George

  8. Helena
    Posted 02/12/2012 at 4:43 PM | Permalink

    This is my story my boyfriend of four years suddenlly break up with me saying he do not think am the right woman for him that he do not want to break my heart that he is scared that he still loves me but we cant just be together i spent days weeping and thinking of what to do untill two days ago when i came across this email address on the internet earlierthebetterspelltemple@gmail.com on the comment forum some one was testifying of how he got help from the temple so i decided to contact the temple i contact the temple immediately and explain my wishes to the temple and they ask me to wait for three days which i did and my ex came back to me right now am so happy cause we are planning our marriage i will never forget you for your kindness i will keep on testifying your good work

  9. Posted 18/12/2012 at 9:00 PM | Permalink

    Helena you do realize that if he wanted to dump you after 4 years you’ll probably in for a very bad marriage from which your kids will suffer?
    Maybe not, and you’re both stupid enough to make it work without realizing how terrible it really is – ignorance is bliss after all.

    Anyways, thanks for the advice on the file and session manager, but the problem with the current firefox version (13 and above) it doesn’t even keep all the tabs in the first place. I tried forcing it to do so numerous times but to no avail. At least now with session manager I can finally force it to save as I please, but for some reason session manager doesn’t allow me to load older sessions from before I installed it.

  10. Shoe Monger
    Posted 28/12/2012 at 7:50 PM | Permalink

    Thank you very, *very* much for this article — it has really helped me. I am not sure I’ll get everything back, but at least I’ve got a chance now.

8 Trackbacks

  1. [...] How to: Recover a lost Firefox session Share this:TwitterFacebookLike this:Like Loading… [...]

  2. By post brothers on 21/09/2014 at 4:09 AM

    post brothers…

    How to Recover Your Firefox Session When All Hope is Lost – TechRant…

  3. By replace tub with walk in shower on 30/09/2014 at 6:39 PM

    replace tub with walk in shower…

    How to Recover Your Firefox Session When All Hope is Lost – TechRant…

  4. By walk in tubs prices on 30/09/2014 at 7:49 PM

    walk in tubs prices…

    How to Recover Your Firefox Session When All Hope is Lost – TechRant…

  5. By 靴鞋 on 28/12/2014 at 10:30 PM

    靴鞋…

    克羅伊、 E.聖露西亞、 E.早餐: 這些是一些受歡迎的加勒比海度假勝地 iss-和最貴之一。相處,你可以找到你的錢在瑪格麗特島上從委內瑞拉 d 海岸額的兩倍。你是歐洲嗎?捷克共和國、 匈牙利和羅馬尼亞爭取豪華點非常好的交易。我必須一直還想要雖然 !特別是由於我有預算袋上空發現通常在巴士官網憑什麼已經成為深藍色。再加上這不是其他袋享受這張圖片看通過使用介質的綠顏色。變化是尼祿的藍色的所有面料、 光魅力音裝置、 箍,zip 抽屜的詳細資訊,強烈的行李標籤,並在 zip 和觸控式螢幕手機口袋內的最高理想…

  6. By Can A Woman Get Period When Pregnant on 29/04/2015 at 10:31 AM

    Can A Woman Get Period When Pregnant…

    … – The best verbal seduction tips you can be just as I am telling you now. Once you have been around many different things that you buy her drinks. If you can answer all 5 of my qu… How to Recover Your Firefox Session When All Hope is Lost … ……

  7. By Feeling Bad For No Reason on 18/02/2016 at 4:26 AM

    Feeling Bad For No Reason…

    … – Proper management of chronic pain and go on fun rides and play movies of the feeling bad for no reason, level. You don't you agree with me? when I pray, will eventually lea… How to Recover Your Firefox Session When All Hope is Lost … ……

  8. By Feelings Of Loneliness on 27/05/2016 at 7:42 AM

    Feelings Of Loneliness…

    … – This is difficult to take action now to show how this debilitating condition. how to combat loneliness includes bitterness – strong feelings of melancholy that are out of despai… How to Recover Your Firefox Session When All Hope is Lost … ……

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Welcome to TechRant…

    We are a group of techies from emerging students to full blown professionals who are enthusiastic about technology related subjects. Everyone has opinions and feelings about things, sometimes stronger than others. On TechRant, we will be sharing those opinions, and have a good ol' rant! We may also do non ranting type articles, like news, reviews, tutorials, tips and tricks, how-tos and even the odd interview.

  • Authors

  • Categories

  • Archives