Søg i Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Læs mere

how to recover unresponsive Pravaite Tabs on Linux

  • 9 svar
  • 1 har dette problem
  • 1 visning
  • Seneste svar af willaa88

more options

0

I opened up around 50 tabs in a single firefox Private Window on Linux and all was good and fast, I then opened another URL in a new tab, which asked me to Stop or Wait for unresponsive script running, where I chose to Stop. Then it started behaving abnormally; I was only able to do the following:

1 scroll on the tab using either middle mouse button or [Up] [Down] key on keyboard jfie 2 right click the tab content to open up right-click menu, 3 hover over the icons and change their background color like Homepage, Refresh, Page Actions, Show sidebars, as well as display their lables;

but I was not able to $ trigger the proper response from above buttons, or $ switch to another tab $ close or create any tab

I noticed in journalctl logs around the time frame this happend, which showed the following:

<date> <hour>:<minute>:30 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ")
<date> <hour>:<minute>:33 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit'
<date> <hour>:<minute>:33 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused
<date> <hour>:<minute>:33 <hostname> gedit[30517]: cannot open display: 
<date> <hour>:<minute>:34 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ")
<date> <hour>:<minute>:34 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit'
<date> <hour>:<minute>:34 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused
<date> <hour>:<minute>:34 <hostname> unknown[30517]: cannot open display: 
<date> <hour>:<minute>:39 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ")
 <date> <hour>:<minute>:39 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit'
<date> <hour>:<minute>:39 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused
<date> <hour>:<minute>:39 <hostname> gedit[30517]: cannot open display

NOTE that I did not open any gedit intentionally during that time window. So far, I have not closed the unresponsive window, in hope that I would be able to restore those tabs. But I am not sure where to start. The $HOME/.mozilla/firefox director is about 100MB.

Could anyone help? I am willing to provide any more information and I am willing to invest my time on this.

0 I opened up around 50 tabs in a single firefox Private Window on Linux and all was good and fast, I then opened another URL in a new tab, which asked me to Stop or Wait for unresponsive script running, where I chose to Stop. Then it started behaving abnormally; I was only able to do the following: 1 scroll on the tab using either middle mouse button or [Up] [Down] key on keyboard jfie 2 right click the tab content to open up right-click menu, 3 hover over the icons and change their background color like Homepage, Refresh, Page Actions, Show sidebars, as well as display their lables; but I was not able to $ trigger the proper response from above buttons, or $ switch to another tab $ close or create any tab I noticed in journalctl logs around the time frame this happend, which showed the following: <date> <hour>:<minute>:30 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ") <date> <hour>:<minute>:33 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit' <date> <hour>:<minute>:33 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused <date> <hour>:<minute>:33 <hostname> gedit[30517]: cannot open display: <date> <hour>:<minute>:34 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ") <date> <hour>:<minute>:34 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit' <date> <hour>:<minute>:34 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused <date> <hour>:<minute>:34 <hostname> unknown[30517]: cannot open display: <date> <hour>:<minute>:39 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Activating service name='org.gnome.gedit' requested by ':1.7' (uid=1000 pid=1249 comm="firefox ") <date> <hour>:<minute>:39 <hostname> dbus-daemon[744]: [session uid=1000 pid=744] Successfully activated service 'org.gnome.gedit' <date> <hour>:<minute>:39 <hostname> org.gnome.gedit[744]: Unable to init server: Could not connect: Connection refused <date> <hour>:<minute>:39 <hostname> gedit[30517]: cannot open display NOTE that I did not open any gedit intentionally during that time window. So far, I have not closed the unresponsive window, in hope that I would be able to restore those tabs. But I am not sure where to start. The $HOME/.mozilla/firefox director is about 100MB. Could anyone help? I am willing to provide any more information and I am willing to invest my time on this.

Ændret af willaa88 den

Alle svar (9)

more options

You can try to create a session log to see whether that includes this window.

You can run this code in the Browser Console. You need to enable the command line in the console.

A log created via the Browser Console includes Private Browsing mode tabs/windows unlike sessionstore.jsonlz4 that only stored regular windows.

/* Get Session data */
ssj = SessionStore.getBrowserState();
ssj = prompt("JSON Session Data", ssj);

Ændret af cor-el den

more options

Thanks a lot for your help. I did what you suggested. and Somehow there was a popup windown appearted with all the JSON data, and I manually copy paste them to a local JSON file, about 1.5MB. Does it make sense for about 50 tabs?

Also here is the file list with timestamp and sizes: (NOTE that I performed the manually saving around 11:08 am on Sep 10)

$ ls -lhrt ~/.mozilla/firefox/xawzxnjt.default/ | tail -4 drwx------ 2 user user 4.0K Sep 9 19:27 bookmarkbackups/ -rw------- 1 user user 21K Sep 10 11:05 prefs.js -rw------- 1 user user 2.2K Sep 10 11:09 xulstore.json drwx------ 3 user user 4.0K Sep 10 11:10 datareporting/


$ du -sh ~/.mozilla/firefox/xawzxnjt.default/datareporting/* 16K /home/user//.mozilla/firefox/xawzxnjt.default/datareporting/aborted-session-ping 1.2M /home/user//.mozilla/firefox/xawzxnjt.default/datareporting/archived 4.0K /home/user//.mozilla/firefox/xawzxnjt.default/datareporting/session-state.json 4.0K /home/user//.mozilla/firefox/xawzxnjt.default/datareporting/state.json

$ ls <FILE> 1.5M Sep 10 11:08 sessionDataSavedManuallyByCopyNPaste.json

So could you guide me throught what I should do next?

Ændret af willaa88 den

more options

Hi willaa88, I'm sure cor-el will be back but I wonder whether you can check something for me.

In Firefox or another browser, you could check the contents of your saved file using my Scrounger tool:

https://www.jeffersonscher.com/ffu/scrounger.html

Does that list out the tabs you wanted to save? I've never tested whether private windows/tabs are listed differently so I don't know whether it will show those.

more options

Private tabs have an "isPrivate" key for tabs in the windows[X].tabs[Y] list.

You can use this code in the Browser Console to parse and decode the session data and possibly paste the result in the body tag using the Inspector.

/* Get Session data */
ssj = SessionStore.getBrowserState();
ssj = prompt("JSON Session Data", ssj);

if (ssj){
sj=JSON.parse(ssj);
sd='<style>body,hr{counter-reset:links}\na:before{content:"[" counter(links) "]" attr(tab) " ";counter-increment:links;color:#000;font-weight:bold}\n</style>\n';
sd+="[windowSelected:"+(sj.selectedWindow)+"]<hr>\n";
for(k in sj){
switch(k){
case"windows":
for(j=0;win=sj[k][j];j++){
 tabs=win.tabs;
 sd+="[window:"+(j+1)+"][tabs:"+(tabs.length)+"][tabSelected:"+(win.selected)+"]<br>\n";
 for(i=0;tab=tabs[i];i++){
  ent=tab.entries;
  pin=tab.pinned;
  pbt=tab.isPrivate;
  if(last=ent[ent.length-1]){
   url=last.url.replace(/#/g,"%23").replace(/&/g,"&amp;");
   title=last.title?last.title.replace(/</g,"&lt;").replace(/>/g,"&gt;"):url;
  }else{url="about:blank"; title=url}
  sd+="<a tab=\"["+(pin?"A":"-")+(pbt?"P":"-")+"]\" href="+url+">"+title+"</a></span><br>\n";
 } /*tabs*/
 sd+="<hr>\n";
 tabs=win._closedTabs;
 sd+="[window:"+(j+1)+"][closedtabs:"+(tabs.length)+"]<br>\n"
 for (i=0;tab=tabs[i];i++){
  ent=tab.state.entries;
  if(last=ent[ent.length-1]){
   url=last.url.replace(/#/g,"%23").replace(/&/g,"&amp;");
   title=last.title?last.title.replace(/</g,"&lt;").replace(/>/g,"&gt;"):url;
  }else{url="about:blank"; title=url}
  sd+="<a href="+(url)+">"+(title)+"</a><br>\n";
 } /*_closedtabs*/
 sd+="<hr>\n";
 } break;
case"scratchpads":
case"_closedWindows":
case"cookies":sd+=k+": ("+sj[k].length+")<br>\n"; break;
case"browserConsole":
case"browserToolbox":sd+=k+": "+sj[k]+"<br>\n"; break;
} /*switch*/
} /*for|k*/
prompt("Decoded session data",sd);
}
more options

Hi cor-el, since the file was already saved and could be opened in a Firefox tab, could you adapt the script to run in the web console using the JSON text that the JSON viewer shows in the "Raw Data" view?

Maybe starting with something along the lines of

var ssj = JSON.parse(document.querySelector('#rawdata-panel pre.data').textContent);

more options

cor-el said

Private tabs have an "isPrivate" key for tabs in the windows[X].tabs[Y] list. You can use this code in the Browser Console to parse and decode the session data and possibly paste the result in the body tag using the Inspector.
/* Get Session data */
ssj = SessionStore.getBrowserState();
ssj = prompt("JSON Session Data", ssj);

if (ssj){
sj=JSON.parse(ssj);
sd='<style>body,hr{counter-reset:links}\na:before{content:"[" counter(links) "]" attr(tab) " ";counter-increment:links;color:#000;font-weight:bold}\n</style>\n';
sd+="[windowSelected:"+(sj.selectedWindow)+"]<hr>\n";
for(k in sj){
switch(k){
case"windows":
for(j=0;win=sj[k][j];j++){
 tabs=win.tabs;
 sd+="[window:"+(j+1)+"][tabs:"+(tabs.length)+"][tabSelected:"+(win.selected)+"]<br>\n";
 for(i=0;tab=tabs[i];i++){
  ent=tab.entries;
  pin=tab.pinned;
  pbt=tab.isPrivate;
  if(last=ent[ent.length-1]){
   url=last.url.replace(/#/g,"%23").replace(/&/g,"&amp;");
   title=last.title?last.title.replace(/</g,"&lt;").replace(/>/g,"&gt;"):url;
  }else{url="about:blank"; title=url}
  sd+="<a tab=\"["+(pin?"A":"-")+(pbt?"P":"-")+"]\" href="+url+">"+title+"</a></span><br>\n";
 } /*tabs*/
 sd+="<hr>\n";
 tabs=win._closedTabs;
 sd+="[window:"+(j+1)+"][closedtabs:"+(tabs.length)+"]<br>\n"
 for (i=0;tab=tabs[i];i++){
  ent=tab.state.entries;
  if(last=ent[ent.length-1]){
   url=last.url.replace(/#/g,"%23").replace(/&/g,"&amp;");
   title=last.title?last.title.replace(/</g,"&lt;").replace(/>/g,"&gt;"):url;
  }else{url="about:blank"; title=url}
  sd+="<a href="+(url)+">"+(title)+"</a><br>\n";
 } /*_closedtabs*/
 sd+="<hr>\n";
 } break;
case"scratchpads":
case"_closedWindows":
case"cookies":sd+=k+": ("+sj[k].length+")<br>\n"; break;
case"browserConsole":
case"browserToolbox":sd+=k+": "+sj[k]+"<br>\n"; break;
} /*switch*/
} /*for|k*/
prompt("Decoded session data",sd);
}


This is amazing, saved me some time to parse the file, it now can be loaded as a HTML page, just amazing! Thanks!

Basically, this solved my problem (i.e., I will be able to open the links again), however, I am just curious, why firefox tried to open gedit?, (ref to my original post, syslog) and how to trouble-shooting the running-script Stop/Wait question pop-up ? How can I actually make existing tabs "alive" again (since it's still in memory)? Is it even possible? What needs to be done?

Thanks!

more options

Can Browser Console provide timestamp for events?

I am able to see the errors associated with the culprit site (which resulted in the Unresponsive Site Stop/Wait question pop-up) in the Browser Console, but I cannot determine the timeline, I may want to reproduce the error, maybe it is just beause of low CPU/mem ? or maybe it is a bug from the website, or from FF? Thanks.

more options

If you enable timestamps in the developer toolbar settings for the Web Console then you will also see them in the Browser Console (this should be reflected instantly if the browser console is open).

more options

Thank you for the information.

Is there a way to "revive" the "dead"/unresponsive tabs? In particular , for the Private Tabs.

Such as whether or not I could do something to kill a related process ( I am aware of that there are only a few PIDs related such as PIDs for firefox, web-extension, and web-content. But I may not want to kill them) or change something on the fly in the browser engine or whatever layer in firefox? I am very interested in this and I am also very interested in the development of firefox browser, but I am at the very very early stage of getting to know the fundamentals. Need some tips to get started on the right track.

Ændret af willaa88 den