Этот сайт имеет ограниченную функциональность, пока мы проводим техническое обслуживание для улучшения его работы. Если какая-либо статья не решила вашу проблему и вы хотите задать вопрос, наше сообщество поддержки ждёт вас: @FirefoxSupport в Твиттере и /r/firefox на Reddit.

Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Подробнее

Lost previous session:- found sessionstore backup but can't open it properly

more options

Hi,

My computer restarted on me while I had several windows and tabs open. When I loaded up Firefox again my previous session was lost and it didn't give me the option to restore previous session/closed windows.

I went into Users-Ronki23-Appdata-Roaming-Mozilla-Firefox-Profiles-5mcffw4a.default-sessionstore-backups and opened the file called 'upgrade' using Firefox but all I can see is my previous sessions URLs in a wall of gibberish; how do I get it so that my tabs come back because I can see the URLs which means all is not lost

The sessionstore file only gives me yahoo because for some reason Mozilla opens yahoo as a new file. I've tried renaming sessionstore to sessionstore.bak and renaming the upgrade file (with the urls) to sessionstore.js but it doesn't do anything.

As stated earlier, the URLs are there but they're surrounded by coding

Hi, My computer restarted on me while I had several windows and tabs open. When I loaded up Firefox again my previous session was lost and it didn't give me the option to restore previous session/closed windows. I went into Users-Ronki23-Appdata-Roaming-Mozilla-Firefox-Profiles-5mcffw4a.default-sessionstore-backups and opened the file called 'upgrade' using Firefox but all I can see is my previous sessions URLs in a wall of gibberish; how do I get it so that my tabs come back because I can see the URLs which means all is not lost The sessionstore file only gives me yahoo because for some reason Mozilla opens yahoo as a new file. I've tried renaming sessionstore to sessionstore.bak and renaming the upgrade file (with the urls) to sessionstore.js but it doesn't do anything. As stated earlier, the URLs are there but they're surrounded by coding

Все ответы (4)

more options

First, make a backup of all the files in the session-backups folder to a safe location, such as a temporary folder under Desktop or Documents.

The kinds of files you may find among your sessionstore files 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

Which file looks the most promising?

As you noted, the internal structure of these files was not meant to be read by humans. it contains a list of open windows, and the active tabs in each window, and up to 10 closed tabs in each window, and up to 3 closed windows, with back history for those tabs that have it. Tons of data.

more options

To investigate the contents of a session history file that's in good condition (not corrupted), you can load it into a Firefox tab and run a script against it.

(1) Create a copy of the session history file you want to mine for URLs and change the .js extension of the copy to a .txt extension.

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 your safe backup folder, 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 the backup 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 (on XP, you might need to hold down the Shift key to get Open With on the right-click context menu).

(3) In the tab displaying the session history file, open the Web Console to run a script. You can use either:

  • Ctrl+Shift+k
  • "3-bar" menu button > Developer > Web Console
  • (menu bar) Tools > Web Developer > Web Console

Copy the following script and paste it on the line at the bottom of the console, then press Enter to run it:

var oWindows = JSON.parse(document.body.textContent).windows; for (var w=0; w<oWindows.length; w++){ var oTabs = oWindows[w].tabs; for (var t=0; t<oTabs.length; t++){ console.log(" Window "+(w+1)+" Tab "+(t+1)+": "+oTabs[t].entries[oTabs[t].index-1].url+" "); } }

The console should fill with lines listing the URLs of each open tab from the file. You can select and copy this list and paste it somewhere for safekeeping.

The console should fill with lines listing the URLs of each open tab from the file. You can select and copy this list and paste it somewhere for safekeeping if you wish.


Once you find the best file, you can try to "swap" it for the existing session history file. There are a lot of steps so I'll start a new post for that.

Изменено jscher2000 - Support Volunteer

more options

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, 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

Any luck?

Изменено jscher2000 - Support Volunteer

more options

Sorry, I just realized you're on Windows. (DOH) I will now edit the above posts with Windows stuff if you check this thread online instead of relying on email: https://support.mozilla.org/questions/1132220