0

When SeaMonkey or Firefox crashes, some of the text you write within various HTML forms is supposed to be recoverable through the sessionstore.json within your profile.

The issue is that the recoverability depends on whether the very same pages could still be requested and will still contain the same input fields for your text to be placed into, otherwise, it appears that it goes away forever.

Is there perhaps some way to, (1), automatically determine such about-to-be-discarded text, and recover it, or, at least, (2), make it possible to examine the whole sessionstore.json, and clearly identify any such saved text (for manual placement into appropriate text-fields (after authentication etc)).

cnst
  • 2,615

2 Answers2

1

I think the file is normally called sessionstore.js (although it only contains valid JSON).

If there is data you may want from the file, you should make a copy of the file to preserve it before restarting Firefox. (I'll assume you've called the copy sessionstore.bk.json).


Accessing the data from the terminal.

Note: This section focuses on Unix-like OSes (Linux, Mac, BSD). If you're on Windows, you can either use a Unix style terminal (eg. Git Bash, MSys, etc) or adapt the instructions to a Microsoft terminal. (For all I know, they might even work as is in Powershell; I'm not familar with it.)

You can pretty print the file to make it readable, and search and copy data using either your terminal pager or a tool such as a text editor. A couple of good command line tools:

  • Python's json module comes with the command line json.tool. For instance, on a Unix shell, the following command will save the file nicely formatted:

    cat sessionstore.bk.json | python -m json.tool > sessionstore.pretty.json
    

    or the following command will let you read it in the terminal pager:

    cat sessionstore.bk.json | python -m json.tool | less
    
  • Node.js's underscore-cli command line tool. If you install NPM, you can then install underscore-cli with the command

    npm install -g underscore-cli
    

    Then you can pretty print in colour to the terminal pager with the command:

    cat sessionstore.bk.json | underscore print --outfmt pretty | less
    

Accessing the data with Python.

If you have a basic familiarity with Python, you can import the data into Python as a dict and access it using the standard methods. For example:

import json

f = open("sessionstore.bk.json")
data=json.load(f)

# print a list of top-level JSON entries
for key in data:
    print key

Most other languages should have similar libraries available for importing JSON data.


Accessing the data with a dedicated JSON viewer.

You could also use a JSON viewer application. A couple of possibilities:

pyrocrasty
  • 1,460
0

Obtaining access to the information via a specialized JSON viewer.You could also use a JSON viewer application.

The online JSON viewer

Faisal
  • 1