Here is the simple way I managed to restore the tab data.
For those who don't know, the sessionstore.js is where Firefox keeps your tab data. Checking my Firefox profile's directory (which was ~/.firefox/MyBrowser/), luckily my sessionstore.js and sessionstore.bak file were both large and full of the tab data. You should find those two files and make a backup of them immediately.
The sessionstore.js is in fact one big JSON file.
On Ubuntu, I installed the package "yajl-tools" which stands for "Yet Another JSON Library". I did this to give me the JSON commands: json_verify and json_reformat.
My first thought was the sessionstore.js was somehow corrupt, but json_verify did not agree with me. Sending my sessionstore.js to json_reformat
I ran this command from command line to check if my file was okay:
cat sessionstore.bak| json_verifyIf you get a message saying okay, then proceed to the next step. This command reformats the
cat sessionstore.bak | json_reformat >sessionstore.jsNext open the sessionstore.js. I found that all the tabs were not being restore because they had been moved to the '_closedWindows' section.
View of my sessionstore.js from the top:
{
"windows": [
{
"tabs": [
{
"entries": [
{
..........
This section had no real tabs. I could tell this should have been filled with data but was empty. Lower down in the file was the "_closedWindows":, which is where all my tabs had gone.
"_closedWindows": [
{
"tabs": [
{
"entries": [
{
"url": "https://mail.google.com/mail/u/0/?ui=2&shva=1#inbox?compose=new",
"title": "Inbox (7) - bob@gmail.com - Gmail",
"subframe": true,
"ID": ....,
"docshellID": ....,
"docIdentifier": ...
},
{
"url": "https://mail.google.com/mail/u/0/?ui=2&shva=1#inbox?compose=new",
"title": "Inbox (7) - bob@gmail.com - Gmail",
..............
So I opened the file in sessionstore.js, copied the the 'tabs' section(including the header) under '_closedWindows' to 'windows' where it should have been, deleted the original and everything is running smoothly again.
Final form of my of my sessionstore.js from the top:
{Hope that helps. Source taken from here: http://dag.wieers.com/blog/what-if-firefox-loses-your-tabs
"windows": [
{ "tabs": [
{
"entries": [
{
"url": "https://mail.google.com/mail/u/0/?ui=2&shva=1#inbox?compose=new",
"title": "Inbox (7) - bob@gmail.com - Gmail",
"subframe": true,
"ID": ....,
"docshellID": ....,
"docIdentifier": ...
},
{
"url": "https://mail.google.com/mail/u/0/?ui=2&shva=1#inbox?compose=new",
"title": "Inbox (7) - bob@gmail.com - Gmail",
..............
No comments:
Post a Comment