Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STG cannot restore session with multiple windows - hangs indefinitely and freezes FF #1178

Open
michaldybczak opened this issue Jun 14, 2024 · 6 comments

Comments

@michaldybczak
Copy link

I don't know what happened, it made have been caused by hibernation and some files went corrupt in the process. Anyway, opening Firefox I see tabs from the wrong group that are trying to be opened and FF is just stuck. I waited for 2 hours and it was still endlessly loading.

Basically, I can't even launch Firefox normally. I had to open it in a safe mode from command line, then disable Simple Tab Groups and launch it again, this time successful. When I enable Simple Tab Groups, I see the same tabs showing up and FF gets stuck again in endless loading.

I need to restore the tabs without accessing the extension, because it's in corrupt state and cannot be enabled. I have hundreds of tabs grouped in a few dozen groups - that is a lot of personalized data. I need it back.

I tried about:sessionrestore, but I get info that something went wrong and it cannot be done, probably due to the session needing the extension. I'm stuck. I cannot restore backup without STG, but I can't enable STG. There has to be a manual way to get to the data in the files.

Thank you!

@michaldybczak
Copy link
Author

I tried to restore session from the file jsonlz4, but it doesn't matter. As soon the STG is enabled, it makes FF unresponsive (the whole system and other apps works fine in that time).
It seems like the STG is causing the issue, and it also holds all the hundreds of tabs. I'm not sure what to do now. I need to fix it during the weekend, because I need the browser to be work-ready on Monday :(. This is a serious, serious issue :(.

@michaldybczak
Copy link
Author

michaldybczak commented Jun 15, 2024

I fixed it! Here is what I did:

  • From safe-mode, I went to STG settings and exported the groups to a file.
  • Then I removed the STG, which took a while, because of hundreds of tabs, that showed up in general session.
  • I restarted FF to a normal session. All tabs were there, functional, but ungrouped.
  • I installed STG again.
  • I went to STG settings and restored the session from the file. It worked and it didn't make FF unresponsive, so the issue that was causing it was gone.

From the behavior, I could assume that some STG file(s) got corrupt. Probably if I reinstalled it manually, it would work as well, but I couldn't tell how to do that.

Anyway, this was a stressing thing!

I enabled the automatic session backups. I wonder, how many sessions will be stored there? Is there a limited number?
Also, is there a way to change the place of the backup folder?

@michaldybczak
Copy link
Author

michaldybczak commented Jun 20, 2024

It happened AGAIN!

Basically, the issue happens, when some of the extension opens an independent window (so there are at least two FF windows), I forget about it, close the main window, then see another one, close it.
When I open FF again, instead of seeing tabs from the previous session and group, the separate window tab is being integrated into main window and ALL tabs are open, waiting for the STG to load, which can't from some weird reason, so the FF is stuck, with high CPU usage and nothing can be done. Having hundreds of tabs is probably elevating the issue to impossible state. Possibly with fewer tabs, it works somehow.

In the past, when done the same, FF simply was opening two windows, no problem. Something has changed and now STG doesn't work correctly.

When I set autobackup, it also misbehaved. Namely, it created the backup, but I had a notification window showing infinite, unfinished backup process. Again, this has something to do with the number of tabs, but again, backup file was created pretty quickly, but notification hang indefinitely and I had to manually close it. Because of that, daily backups are very annoying, so I had to chose not so frequent ones.

Of course, when the issue happened again, I didn't have current backup and a lot of tabs changed... I tried to do the same as above, but I can't access the STG options in safe mode. I have no idea how I got them previously. Will be trying to fix this again, but the issue remains, so it stays open, but I change topic to more explaining one.

UPDATE:
Was able to recover by doing this:

  • disabled STG in safe mode, which showed all tabs in one window
  • launched FF normally, tabs were gone, only extension tab was active
  • enabled STG again, this time without freezing anything
  • I could switch to one of the existing groups, all tabs were preserved

@michaldybczak michaldybczak changed the title Extension broke session and Firefox - how to restore tabs? STG cannot restore session with multiple windows - hangs indefinitely and freezes FF Jun 20, 2024
@pickyusernamepicker
Copy link

pickyusernamepicker commented Jun 26, 2024

I confirm that using two Firefox windows at the same time can lead to a royal mess.

  1. It doesn't happen every time, but when it does, the session gets borken: all tabs lose their history (back/forward lists)
  2. In my case, pop-ups don't need to cause problems if you close them relatively quickly, but if you open one tab group in one window, another in another, then forget to close both windows simultaneously with Ctrl+Shift+Q and close only one window, then try to restore the closed window, you run the risk of borking your session
  3. I've recently encountered a more specific scenario (STG 5.2):
  • I had a pending FF update (from 127.0.1 to 127.0.2), so I closed the normal window, but I still had a private window left
  • the computer crashed
  • after system restart, FF autostarted due to a group policy opening a specific webpage during every login
  • after the update was installed, I was left with a new window containing only the said webpage
  • when I restored the last closed window, my tabs were there, but with no back/forward history.

@achernyakevich-sc
Copy link

2. In my case, pop-ups don't need to cause problems if you close them relatively quickly, but if you open one tab group in one window, another in another, then forget to close both windows simultaneously with Ctrl+Shift+Q and close only one window, then try to restore the closed window, you run the risk of borking your session

@pickyusernamepicker Ctrl+Shift+Q is only the way to properly close the whole Firefox browser. The browser is not the same as the browser's window. It is how browser works and treat your actions. It is not about STG but about the Firefox browser. When you close a window then you close only one window. So for the current browser session it means that you don't need this window anymore, browser will adjust session correspondingly and as result when browser will restore the session then this window will not be restored.

If you closed some window and would like to restore it then you can use Ctrl+Shift+W shortcut - it restore the latest closed window with all tabs, etc. It could be used several times to restore several latest closed windows. You could even try to use it after your restarted browser and restored previous session (if I do not mix anything).

Separately I would like to point that Firefox has separate processes for core that works in the background and windows/pages. So if you close the last existing window and open the new one enough fast then it could happen that core process will not be unloaded/terminated and will be used for creating new window. It means that session restoring will not happen. It would be equivalent to opening new empty window and closing old window.

I hope this comment helped you to understand how it works and will help to restore earlier closed browser's windows.

@pickyusernamepicker
Copy link

@achernyakevich-sc I'm fully aware of the functionality you're describing, but it doesn't normally result in tabs losing their history. A window restored with Ctrl+Shift+W should have the history lists (available when you RMB Back or Forward) restored as well. STG can cause a situation when these lists are emptied (and all the tabs lose their favicons, but that isn't as much of a nuisance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants