Blank tabs after crash and restore
Hello! My problem is following: Firefox crashed and all the tabs are just blank after I restarted it. I've tried all other related solutions on this site and came to conclusion, that all 3 session files are somehow corrupted. Although they still do contain all the tabs URLs (checked by opening files with notepad) - they just won't load them. Is there a way to repair these files somehow or to extract URLs in some file that can be imported into Firefox after? Like bookmark or html file.
Vsi odgovori (7)
Places Maintenance {web link} Allows to run Maintenance tasks on the database that drives Places, the bookmarks and history module behind Firefox.
Open the Add-ons Manager. Locate the add-on and press the Options button. Select All of the tests. Then press Execute on the bottom.
Try opening the session file with a text viewer.
If the above works or not, delete the 3 session files.
The offered solution didn't help and I think there is a misundertanding. When I said corrupted I meant that it doesn't load properly due to some internal parameters errors, but each file as itself is intact and can be opened and read without problem. There are just too many URLs in it to process it manually.
Session history files can be very voluminous. In addition to currently open pages, they usually include back history for the open tabs, recently closed tabs, all the tabs in recently closed windows, and "extra" data for tabs such as cookies.
Maybe you don't need all that, but when you said --
There are just too many URLs in it to process it manually.
-- do you mean literally by hand? Yes, that's a nightmare. You could try extracting the URLs using the snippet of script posted by cor-el in the following thread, or the site mentioned there: https://support.mozilla.org/questions/1085742
jscher2000 said
You could try extracting the URLs using the snippet of script posted by cor-el in the following thread, or the site mentioned there: https://support.mozilla.org/questions/1085742
When I try to run that script I get the following:
SyntaxError: expected expression, got '<'
And it may be a nightmare, but maybe you know a way to display this session file in a more readable way? Like not just a wall of text, but at least split into sections by type of data?
Spremenil sergeyua
Hmm, that could be the problem: the data structure being broken in some way that prevents it from being parsed properly.
My first language is Word Visual Basic (VBA), so when I had to try extracting from a damaged file before, I wrote a Word macro: http://pastebin.com/iK6x2i1N
Here's a macro-enabled document set up with that macro, with slight formatting tweaks: https://jeffersonscher.com/res/SessionExtract.docm
You can try a bookmarklet like this:
javascript:(function(){var D=document,H,i=j=0,P=D.getElementsByTagName('pre'),t=[],R=/[^:]\{"entries":\[\{("url":"([^"]*)")\,("title":"([^"]*)"){0,1}/g,T,U;for(j=0;E=P[j];j++){H=E.innerHTML;while(R.exec(H)){U=RegExp.$2;T=RegExp.$4;if(T.length==0){T=U;}t.push('<b>['+(++i)+']</b> <a href='+U+'>'+T+' ('+U+')<\/a>');}}with(window.open().document){write(t.join('<br>\n'));close()}})();
You can look at this MozillaZine forum thread about inspecting a sessionstore file and extract URLs.