Closed Bug 1947503 Opened 13 days ago Closed 11 days ago

SessionStore can NOT open closed windows that was saved before Firefox 135

Categories

(Firefox :: Session Restore, defect, P1)

Firefox 135
defect
Points:
3

Tracking

()

VERIFIED FIXED
137 Branch
Tracking Status
relnote-firefox --- 135+
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox135 + fixed
firefox136 + verified
firefox137 + verified

People

(Reporter: tabmix.onemen, Assigned: jswinarton)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-tabgrps-sessionstore])

Attachments

(3 files)

Closed windows that was saved before Firefox 135 don't have groups and closedGroups.

Trying to open such closed window in Firefox 135, does noting and the window removed from closed Windows list and its data is lost.

This is the error from Browser Console:

TypeError: state.windows[0].groups is undefined SessionStore.sys.mjs:4516:26
ssi_undoCloseWindow resource:///modules/sessionstore/SessionStore.sys.mjs:4516
ss_undoCloseWindow resource:///modules/sessionstore/SessionStore.sys.mjs:597
undoCloseWindow chrome://browser/content/browser.js:6063
createEntry resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs:443

Same error in Firefox Nightly:

TypeError: can't access property Symbol.iterator, state.windows[0].groups is undefined SessionStore.sys.mjs:4575:26
ssi_undoCloseWindow resource:///modules/sessionstore/SessionStore.sys.mjs:4575
ss_undoCloseWindow resource:///modules/sessionstore/SessionStore.sys.mjs:605
undoCloseWindow chrome://browser/content/browser.js:5487
createEntry resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs:500

In Firefox Nightly, History > Recently Closed Tabs show an empty popup with this error:

Uncaught TypeError: can't access property Symbol.iterator, winData.closedGroups is undefined
    ssi_getClosedTabGroups resource:///modules/sessionstore/SessionStore.sys.mjs:4097
    ss_getClosedTabGroups resource:///modules/sessionstore/SessionStore.sys.mjs:431
    getClosedTabGroupsById resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs:36
    getTabsFragment resource:///modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.sys.mjs:84
    populateUndoSubmenu chrome://browser/content/browser-places.js:639
    <anonymous> chrome://browser/content/browser-menubar.js:189
SessionStore.sys.mjs:4097:31

This sounds pretty bad. Asking Jeremy and DJ to look into this.

Severity: -- → S2
Points: --- → 3
Flags: needinfo?(jswinarton)
Flags: needinfo?(dwalker)
Priority: -- → P1
Whiteboard: [fidefe-tabgrps-sessionstore]

I've tried:

  1. creating a profile in 134, enabling session restore, closing a few tabs
  2. quit and open the same profile in 135 / 136b4
  3. reopen the first closed tab from the history menu in the menu bar

Seems to work without problems in both 135 and 136b4. Do you have different steps to reproducing this bug?

Flags: needinfo?(tabmix.onemen)

(In reply to Dão Gottwald [:dao] from comment #2)

This issue is about closed windows and closed tabs from closed windows

  1. creating a profile in 134, enabling session restore,
  2. open 2nd windows, in the 2nd window, closing a few tabs, leave at least one tab open, close the window
  3. do some action in the 1st window, quit Firefox 134.
  4. open the same profile in 135 / 136b4

now you have saved session with closed tabs only from closed windows

make sure you have:
browser.sessionstore.closedTabsFromAllWindows is true
browser.sessionstore.closedTabsFromClosedWindows is true

Result in 135, 136b4, 137a:
5. History > Recently Closed Windows > click to restore or Ctrl+Shift+N --> TypeError: state.windows[0].groups is undefined

Result in 137a:
6. History > Recently Closed Tabs --> Uncaught TypeError: can't access property Symbol.iterator, winData.closedGroups is undefined

Flags: needinfo?(tabmix.onemen)
Assignee: nobody → jswinarton
Status: NEW → ASSIGNED
Attachment #9465736 - Attachment description: WIP: Bug 1947503: Closed tab groups code supports session store files created before Firefox 135 → Bug 1947503: Closed tab groups code supports session store files created before Firefox 135 r?dao,dwalker
Attachment #9465736 - Attachment description: Bug 1947503: Closed tab groups code supports session store files created before Firefox 135 r?dao,dwalker → Bug 1947503: Closed tab groups code supports session store files created before Firefox 135: beta uplift patch r?dao,dwalker
Attachment #9465736 - Attachment description: Bug 1947503: Closed tab groups code supports session store files created before Firefox 135: beta uplift patch r?dao,dwalker → Bug 1947503: Closed tab groups code supports session store files created before Firefox 135 r?dao,dwalker
Attachment #9465952 - Flags: approval-mozilla-beta?
Pushed by jswinarton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/916701f86335 Closed tab groups code supports session store files created before Firefox 135 r=dao,dwalker,sessionstore-reviewers
Attachment #9465973 - Flags: approval-mozilla-release?

beta Uplift Approval Request

  • User impact if declined: Users with session restore enabled that start up Firefox after a version upgrade will no longer be able to access closed windows, or closed tabs from closed windows, through history menus
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: See https://bugzilla.mozilla.org/show_bug.cgi?id=1947503#c3
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Change is limited to adding null checks for missing session store props.
  • String changes made/needed: None
  • Is Android affected?: no
Flags: qe-verify+

release Uplift Approval Request

  • User impact if declined: Users with session restore enabled that start up Firefox after a version upgrade will no longer be able to access closed windows, or closed tabs from closed windows, through history menus
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: yes
  • Steps to reproduce for manual QE testing: See https://bugzilla.mozilla.org/show_bug.cgi?id=1947503#c3
  • Risk associated with taking this patch: Low
  • Explanation of risk level: Change is limited to adding null checks for missing session store props.
  • String changes made/needed: None
  • Is Android affected?: no
Flags: in-testsuite+
Flags: needinfo?(jswinarton)
Status: ASSIGNED → RESOLVED
Closed: 11 days ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Attachment #9465952 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Reproduced the issue by creating a profile in Firefox Nightly 134.0a1, enabling session restore and opening the same profile in Firefox Nightly 137.0a1 (2025-02-13)/Firefox Beta 136.0b5.
Confirming the issue is fixed in Firefox 137.0a1(2025-02-14)/Firefox Beta 136.0b6 (treeherder build).

I was unable to reproduce the issue with Firefox release 135.0.

QA Whiteboard: [qa-triaged]
Attachment #9465973 - Flags: approval-mozilla-release? → approval-mozilla-release+

Added to the 135.0.1 relnotes.

Fixed being unable to restore closed windows and tabs via the History menu when upgrading from an older Firefox version.

Flags: needinfo?(dwalker)

I was not able to reproduce the issue at all in Firefox Release 135.0 so I can't confirm the fix with RC 135.0.1.

@tabmix.onemen can you please take a look on your end to confirm that this is fixed in RC 135.0.1 since you were the only one who managed to see the issue? 135.0.1 is available for download here: https://archive.mozilla.org/pub/firefox/candidates/135.0.1-candidates/build1/

Flags: needinfo?(tabmix.onemen)

I have just tested Firefox version 135.0.1 and I can confirm that this bug was fixed

Status: RESOLVED → VERIFIED
Flags: needinfo?(tabmix.onemen)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: