X
點擊此處開啟此網站的行動版。

技術支援討論區

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.

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.

額外的系統細節

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 1.1.4322; raidcall; rv:11.0) like Gecko

更多資訊

FredMcD
  • Top 10 Contributor
4259 個解決方法 59635 個答案

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.

'''[https://addons.mozilla.org/en-US/firefox/addon/places-maintenance/ 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.

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.
jscher2000
  • Top 10 Contributor
8772 個解決方法 71719 個答案

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

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 -- <blockquote>There are just too many URLs in it to process it manually. </blockquote> -- 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 '<'

''jscher2000 [[#answer-813946|said]]'' <blockquote> 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 </blockquote> 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?

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?

由 sergeyua 於 修改

jscher2000
  • Top 10 Contributor
8772 個解決方法 71719 個答案

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

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
cor-el
  • Top 10 Contributor
  • Moderator
17536 個解決方法 158571 個答案

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.

You can try a bookmarklet like this: <pre><nowiki>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()}})(); </nowiki></pre> ---- *https://firefox-session-restore.herokuapp.com/ You can look at this MozillaZine forum thread about inspecting a sessionstore file and extract URLs. *http://forums.mozillazine.org/viewtopic.php?f=38&t=622036&start=45 *http://forums.mozillazine.org/viewtopic.php?f=38&t=622036&start=60