sienori / Tab-Session-Manager

WebExtensions for restoring and saving window / tab states
https://tab-session-manager.sienori.com/
Mozilla Public License 2.0
1.92k stars 189 forks source link

Tab session manager restored tabs in the wrong order #369

Open Question2 opened 5 years ago

Question2 commented 5 years ago

Short description

Seems to be the same issue as : https://github.com/sienori/Tab-Session-Manager/issues/140

Loaded tabs today, and it restored them in reversed order, so for example tabs 1 - 1000, got reversed to tabs 1000 - 1. I kept loading older sessions and had to load one that was about 7 or 8 sessions old to get the right order.

Steps to reproduce

Cant reproduce on demand, session manager just loaded the tabs in the wrong order today.

Platform information

win 10 64 bit Firefox 64 ESR Version 43 of session manager I ( i just updated it to the latest version)

Additional context

Question2 commented 5 years ago

Opened firefox today, tab session manager 44 loaded everything in the wrong order again. Not necessarily reversed, but jumbled up.

azeos commented 5 years ago

Same thing here, tabs load in the opposite order.

Win 10 64 bit Firefox 64.0.2 Tab Session Manager v4.4.0

RobertAb1 commented 5 years ago

Similar problem: https://github.com/sienori/Tab-Session-Manager/issues/87 https://github.com/sienori/Tab-Session-Manager/issues/359

Celtri commented 5 years ago

same Problem here, at each new Firefox and PC start, windows locations (about 10 Firefox windows active) and windows sequence are very different, not found any logic behind. Tabs inside the similar Firefox windows are matching (as wanted) and always as saved.

Win 7 64 bit Firefox 64.0.2 Tab Session Manager v4.4.0 (same at 4.3.3) if remember right, problem don´t exist at old version 3.2.0

sienori commented 5 years ago

I can not reproduce the problem. Does it occur even if you disable other add-ons (Tree Style Tab etc)?

Please tell me the status of the option

Celtri commented 5 years ago

I can not reproduce the problem. / I could, each new start different from the other Does it occur even if you disable other add-ons (Tree Style Tab etc)? /not installed

Please tell me the status of the option

* Tab lazy loading /**On**

* Use the "discarded" property for lazy loading/**ON**

* Supports Tree Style Tab / **-> now Off, but no difference**

Is it possible to sort the windows by Hand? The different 10 windows, still have same numbers as weeks ago, and windows 1 is always windows 1, but the windows sequences are still very different. did`t know how many possibilities there are (;-)

sienori commented 5 years ago

@Celtri

each new start different from the other

Are you enabling Restore previous session at startup option in Tab Session Manager?

Is it possible to sort the windows by Hand? The different 10 windows, still have same numbers as weeks ago, and windows 1 is always windows 1, but the windows sequences are still very different. did`t know how many possibilities there are (;-)

Does "windows sequences" mean the order displayed in Tab Session Manager? windows sequences

Celtri commented 5 years ago

@Celtri

each new start different from the other

Are you enabling Restore previous session at startup option in Tab Session Manager?

Is it possible to sort the windows by Hand? The different 10 windows, still have same numbers as weeks ago, and windows 1 is always windows 1, but the windows sequences are still very different. did`t know how many possibilities there are (;-)

Does "windows sequences" mean the order displayed in Tab Session Manager? windows sequences

Yes, Option "Restore previous session at startup" option in Tab Session Manager? - is ON

Does "windows sequences" mean the order displayed in Tab Session Manager? NO- the order displayed as shown from you, is, as it should be and always correct.

The opened 10 firefox windows are not correct, not correct order and not correct (saved) place at screen.

Question2 commented 5 years ago

I have noticed that if I have the "Restore previous session at startup" option in tab session manager is on, i will get some tabs in the wrong order. But not if I have it off, at which point i guess the built in firefox session manager is taking over.

LandisTwo commented 5 years ago

Similar here: each of the tab groups I've purposefully saved (not auto-saved groups), when opened later (few hours, next day), the window opens with all tabs loaded in Reversed Order. What was the first tab on left is opened in 'new window' as last tab on right. and the last tab on right is opened as the first tab on left and so on. Every Time. This goes for imported sessions from 'Session Manager' as well. Imported 4 windows (sessions) and all 4 were in reverse order. The last window closed (auto-saved on close), when re-opened is in the right order.

Thanks. Landis

Tab Session Manager 4.4.0
Firefox 60.5.0esr
OS: openSuSE Linux
Desktop: 
KDE 4.14.9
Kwin: 4.11.20
sienori commented 5 years ago

@Celtri Currently, the "order of windows" (order of display, order of overlap) is not restored. When you click open session, the windows are opened in order of internal window ID. If you move the window after the session is saved, the position of the window will not be restored correctly. In the case of automatic saving, sessions are saved when the tab is opened or closed. To avoid confusion, please discuss the window order problem with another issue (In this issue we discuss the "tab order").

sienori commented 5 years ago

@Question2 @azeos @LandisTwo @karlbu I can not reproduce the problem that tabs are opened in reverse order. Please tell me how to reproduce the problem. The procedure I tried is as follows.

  1. Open four tabs in one window 4 tabs
  2. Save the session saved session
  3. Open the session with "open in new window" open
  4. The session are opened in the correct order opend session

Also, my settings: settings

karlbu commented 5 years ago

Hi and thanks for your update.  This has been working recently, so no need to continue to track at the moment. Thank you,

Karl Buhl

On 2/8/2019 2:06 PM, RobertAb1 wrote:

To avoid confusion, please discuss the window order problem with
another issue (In this issue we discuss the "tab order").

Do you know the number of Issue where the wrong order of windows is discussed?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sienori/Tab-Session-Manager/issues/369#issuecomment-461911234, or mute the thread https://github.com/notifications/unsubscribe-auth/AL6wl3CD_gjHkBTNhMZfuUqld6mecu69ks5vLcrTgaJpZM4Z0jG6.

RobertAb1 commented 5 years ago

Problem still exists.

Any time I would use Tab Session Manager to recover session or window, the order of tabs is wrong. Problem exists: 1) when I am recovering session at the Firefox start, 2) when I am opening session/window when Firefox is running.

There is also wrong windows order: https://github.com/sienori/Tab-Session-Manager/issues/375

sienori commented 5 years ago

There is no problem in my environment.

Here is the test session I used. It contains three 10-tab windows. testSession.zip

Please import the test session and open it. Does the problem occur?

RobertAb1 commented 5 years ago

There is no problem with all 30 google pages from your test (I am talking about order of tabs).

But when I have added 3 empty tabs to one of the windows problem started to be visible. Compare 1.json and 2.json I send you by the e-mail. 1.json was the 1st session and 2.json - session after restart. Notice the shift of empty tabs.

The order in window with new tabs. BEFORE restart: 2-1 2-2 new tab 2-3 new tab new tab 2-4 2-5 2-6 2-7 2-8 2-9 2-10

AFTER restart: 2-1 2-2 2-3 new tab 2-4 new tab new tab 2-5 2-6 2-7 2-8 2-9 2-10

AFTER 2nd restart: 2-1 2-2 2-3 new tab new tab new tab 2-4 2-5 2-6 2-7 2-8 2-9 2-10

AFTER 3rd restart: 2-2 new tab new tab new tab 2-3 2-1 2-4 2-5 2-6 2-7 2-8 2-9 2-10

Create your session with pages from different domains, and repeat some of them.

Firefox build-in session restore (with TSM off) restores the order correctly.

RobertAb1 commented 5 years ago

Did you receive my files? Did you noticed a problem?

sienori commented 5 years ago

That is strange. If you provide a screen record, I might notice a problem.

RobertAb1 commented 5 years ago

What should be on this screen shot?

I send you json files to your e-mail (sienori.firefox+tsm@gmail.com). Did you get them? You could test/diagnose problem on your machine.

I have also updated message above with results after two other restarts. And I could see before even more drastic changes to the order of tabs in windows, when empty tabs are located in different parts of tab strip. The order of all tabs in windows could change constantly after following restarts.

sienori commented 5 years ago

I can not understand the detailed reproduction procedure only with the text. Please use the video to tell me exactly how you reproduced the problem.

Thank you for taking the time to this problem.

RobertAb1 commented 5 years ago

I can not understand the detailed reproduction procedure only with the text. Please use the video to tell me exactly how you reproduced the problem.

Thank you for taking the time to this problem.

It is very simple. Open Firefox with your test session you send me and in one window add in the middle 3 empty tabs by using Ctrl + T. Then restart Firefox and check the order of tabs in this window.

Alternatively, you can import one of json files I send you and restart Firefox (1 or more times) and compare the order.

sienori commented 5 years ago

In plain firefox, using Ctrl + T adds a new tab to the far right.

RobertAb1 commented 5 years ago

I am using extension "Open Tabs Next to Current" to add new tab just on the right to the active tab.

sienori commented 5 years ago

Basically, please use a clean profile when reporting bugs. Does the problem occur if you disable other add-ons?

RobertAb1 commented 5 years ago

Problem disappeared when I disabled just "Open Tabs Next to Current".

Interestingly, there is no problem with order of tabs when tabs are restored using Firefox build-in session management, even when "Open Tabs Next to Current" is active.

RobertAb1 commented 5 years ago

So we have conflict between "Tab Session Manager" and "Open Tabs Next to Current". https://addons.mozilla.org/en-US/firefox/addon/open-tabs-next-to-current/

sienori commented 5 years ago

The cause is probably that the tab specification of "Open Tabs Next to Current" is incorrect. Please use other add-on. https://addons.mozilla.org/ja/firefox/addon/always-right/

RobertAb1 commented 5 years ago

It looks like now the problem do not appear with "Always Right". Thanks. https://addons.mozilla.org/en-US/firefox/addon/always-right/

RobertAb1 commented 5 years ago

@sienori

Just small suggestion. We have found conflict between "Tab Session Manager" and "Open Tabs Next to Current". Maybe it will be good idea if you can create a website in Wiki about other extensions which are not working with TSM well in Firefox, describe the type of problems users can have (or add link to discussion like here) and give the list of alternative extensions to those giving problems. You could also add on AMO a link to this Wiki page. That way you could avoid some negative ratings and reviews of your extension.

RobertAb1 commented 5 years ago

Open Tabs Next to Current is causing problems with Tab Session Manager: https://github.com/sblask/webextension-open-tabs-next-to-current/issues/72

I have notified developer of Open Tabs Next to Current (@sblask) about the conflict between add-ons, discussed here with @sienori on Apr 6, 2019.

@sblask comment:

(...) I have some special handling to avoid re-ordering for restored tabs. And that works well for tabs restored by Firefox directly. So I assume it the way tabs are restored by tab-session-manager.

Also the issue with the order of tabs when new tabs are present is reported often to @sblask - https://github.com/sblask/webextension-open-tabs-next-to-current/issues?q=is%3Aissue+is%3Aclosed

eoinkennedy commented 5 years ago

Hi, Extension https://addons.mozilla.org/en-US/firefox/addon/tab-open-close-control/ Tab Open/close control causes the same problem. Bug must be in Session Manager?

gmuller2 commented 5 years ago

Hi, This issue has been bugging me for some time in both Chrome and Firefox. After my Chrome 'crashed' (closed abruptly) due to a PC reboot, I decided to do some more troubleshooting to help getting to the root cause of this. Like others I have always seen that some/all tabs are reopened in reverse order. After getting all my tabs back in the right order I did the following test:

  1. Baseline - 1 Windows with lots of tabs
  2. Open new Window & open my 2 fav tabs in new window (not necessary for test)
  3. Dragged (moved) 8 tabs from Window 1 to Window 2.
  4. In Window 1 make a tab in middle active (in my case tab 17 of 57).
  5. In Window 2 make the very last tab active.
  6. For easier comparison later positing windows cascaded so that you can see tabs row of both windows.
  7. Wait for Tab Session Mgr auto-save or manually save all windows.
  8. In Tab Session Mgr select the new saved session and open in new windows - you should now have 4 windows in total. Windows 1 & 3 (and 2 & 4) are the same number of tabs.
  9. Reposition windows for comparison.
  10. The result is as follows: In Window 3 the tabs 1 to your active tab (tab 17 in my case) are in the correct (same) order as Window 1. However, the remaining tabs are in reverse order compared to Window 1. In comparison, for Windows 2 & 4 the order is correct (since the last tab was active).

Here is a fullscreen shot for the above ... image

karlbu commented 5 years ago

This is the issue that never seems to get solved. I have found that if I repeatedly open the Tab Session Manager group (2-3-4 times), it sometimes does bring up the tabs in correct order.

Perhaps try that as a workaround.

zekeblue commented 5 years ago

I have the problem as well. I do not have restore tabs on start checked. I do not use the open tabs next to current addon.

What does work to fix it is saving the current session, then opening the newly saved session in same window. That eliminates the tabs that were in reverse order and replaces them again.

So, it is using this problem to remedy itself. One has tabs in reverse order. Save that session and open it again. Opening will open that session in reverse order, which is now the correct order.

Who's on first?!

TinyTrbl commented 4 years ago

After all this time it's still not fixed. Tab lazy loading and Use the "discarded" both enabled i just opened my very old 2000 tabs session and some tabs were open at the beginning instead of the end.

@sienori you are testing this bug with minimal amount of tabs, Firefox can process them really fast so there is not time to struggle with tabs order, try something heavy, like 500 or even 1000 tabs and you may get these bugged results...

Also you can try to add the same session to one window and check the results.

GaryQld commented 4 years ago

Let me see if I can explain it a little better...

Lets say I have 20 tabs open. When I exit, Im focuced on Tab12. When I reload that session, tabs 1 to 11 will be in the correct order, but tabs 12 to 20 will be reversed. If you have a lot of tabs open in a single window (its fast so you need a lot to observe it) and then watch the tabs load, you can see them load, then watch as tabs to the right of whatever tab the reload focuses on, all load and then they will reverse order. If I exit on Tab7, tabs 1 to 6 will be in the correct order, while Tabs 7 to 20 will reverse. It seems dependent on which tab is focused on to close, or start the session.

I had a fix, between tab 1 and 2, open a blank tab. For me thats a speed dial page. And then open another blank tab as the very last tab. If I then focus on tab 1, then exit, I think the two blank tabs swap, but all other tabs are in the correct order. It could be me, but I dont think it worked all the time but seemed to work mostly.

Ill come back, because I stopped doing it, the problem is so annoying at times the addon became unusable to me so I cant remember which tab I focused on to exit to solve it. Ill go have a crack at it.

EDIT: OK, so I did some playing and screencaps. I opened tabs based on results for Galaxy Tabs from 2 to 6, plus two new pages (speed dials) to number the tabs and demonstrate the changes.

This is the original session Beginning order

When I exit, focus was on the last new tab, a speed dial page. Note, the two speed dials now sit side by side, and the rest of the tabs to the right are reversed from the above session Exit, forus on last blank tab, Reopen, order is reversed blanks side by side

I then manually reordered the tabs to make them the same as first image again, focus was on the first tab upon exit, now they are in the correct order, but the focus is now on Tab 6. I believe the two speed dial tabs swapped places. Reopen after closed, focused in Tab1

I wonder if a temporary fix might be to make the session reload with the focus on the last tab. that way no tabs are to the right, to reverse order.

kenreeser commented 1 year ago

I'm running MacOS Firefox version 118.0.1 and I too am experiencing a reversed Tree Style Tab order when I reopen a Tab Session Manager session. In my case, my total top-to-bottom order is correct (i.e. not reversed). Instead, I have small groups of hierarchically organized tabs that get reversed. Because I initially thought this was a Tree Style Tab issue, I cleared its cache. Unfortunately, this made things worse—my small groups of organized tabs lost their hierarchical organization. Also, my small groups of organized tabs still expand and contract, but they do so upwards in reverse order. Interestingly, when I moved a contracted top-level tab for a small group of sub-tabs within the larger list of tabs or to a new window, the sub-tabs appeared in the correct order. Given the fact that this issue has transcended browsers and OS platforms, I would have to say there's a bug somewhere. I'm a Tab Session Manager donator and would love to see this resolved.

2023-10-08_11-32-54 2023-10-08_11-40-39 2023-10-08_12-37-31