Postponing session restore and restarting causes session to be overwritten

NEW
Unassigned

Status

()

Firefox
Session Restore
--
critical
7 years ago
4 years ago

People

(Reporter: Ben, Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(firefox5 affected, firefox6-)

Details

(Whiteboard: [quit-dialog-delayed-restore-fallout])

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b12) Gecko/20100101 Firefox/4.0b12

With home page set to default (about:home) and a restorable session available, if you open Firefox, change your mind about restoring, close and restart Firefox later you find your saved session has been overwritten by about:home.

Reproducible: Always

Steps to Reproduce:
1. Set home page to about:home and close Firefox with tabs open.
2. Restart Firefox.  Your home page is displayed.
3. Close Firefox (using X or File > Exit), restart and restore session.
Actual Results:  
A single instance of about:home is displayed instead of tabs from Step 1.

Expected Results:  
Your tabs are displayed alongside the instance of about:home from Step 2.

Updated

7 years ago
Version: unspecified → Trunk
I'll consider this fallout, though it was something we knew going in. And historically Firefox has only ever tracked a single previous session.

There is probably some work that could be done here, but we make some decisions at startup before processing the session file. Nothing is going to happen for Firefox 4 though.
Whiteboard: [quit-dialog-delayed-restore-fallout]
(Reporter)

Comment 2

7 years ago
The issue here is surely a pre-exit one: does Firefox consider this a session (and thus something that warrants overwriting the previous one) when the user hasn't done anything?

This makes day-to-day use of on-demand session restore more dicey as well as, of course, compounding Bug 636777.

I don't actually think restoring multiple sessions would be hard to pull off; it's just a matter of identifying sessions to the user and giving Restore Previous Session a sub-menu, ie:

  Session 1 (1 Window, 1 Tab)
  Session 2 (2 Windows, 53 Tabs)

The user could easily see where the session they cared about had gone, and all these controversial issues would be resolved as it would no longer be a case of data loss.

Programming-wise while the issues of getting session restore right in general are complex, the session itself is just a record of windows and tab contents; surely all you have to do is present the user with a way to select from multiple instances of that.

I strongly urge not going to on-demand session restore before adding support for multiple sessions - the session data is currently too vulnerable.

(In reply to comment #1)
> I'll consider this fallout, though it was something we knew going in. And
> historically Firefox has only ever tracked a single previous session.
> 
> There is probably some work that could be done here, but we make some decisions
> at startup before processing the session file. Nothing is going to happen for
> Firefox 4 though.

Comment 3

7 years ago
is this not dupe of Bug 636716 ?
(Reporter)

Comment 4

7 years ago
(In reply to comment #3)
> is this not dupe of Bug 636716 ?

It's similar but not the same.  

In this bug, starting and then exiting via:
Exit menu item, X on window or Alt-F4 = session overwritten by instance of about:home (minus a Restore Previous Session button)

In Bug 636716, starting and then exiting via:
Exit menu item = session is overwritten by blank page
X on window or Alt-F4 = session is erased

This is the situation in Firefox 4.0 (final release).
Duplicate of this bug: 651213
(In reply to comment #1)
> I'll consider this fallout, though it was something we knew going in. And
> historically Firefox has only ever tracked a single previous session.

I disagree strongly with that assessment. So long as you left about:sessionrestore open when you created new tabs, Firefox had no problem saving nested sessions. I took advantage of that for many moons.

(In reply to comment #4)
> (In reply to comment #3)
> > is this not dupe of Bug 636716 ?
> 
> It's similar but not the same.  
> 
> In this bug, starting and then exiting via:
> Exit menu item, X on window or Alt-F4 = session overwritten by instance of
> about:home (minus a Restore Previous Session button)
> 
> In Bug 636716, starting and then exiting via:
> Exit menu item = session is overwritten by blank page
> X on window or Alt-F4 = session is erased
> 
> This is the situation in Firefox 4.0 (final release).

They sound like the same basic thing to me: if you don't restore your session on first launch, it's overridden with your default new session behavior.

I'm confirming this because I filed the dupe bug 651213.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Duplicate of this bug: 636716
status-firefox5: --- → affected
tracking-firefox6: --- → ?
(In reply to comment #6)
> (In reply to comment #1)
> > I'll consider this fallout, though it was something we knew going in. And
> > historically Firefox has only ever tracked a single previous session.
> 
> I disagree strongly with that assessment. So long as you left
> about:sessionrestore open when you created new tabs, Firefox had no problem
> saving nested sessions. I took advantage of that for many moons.

You can still do that. We haven't changed the rules for showing about:sessionrestore so you would still see it under the same circumstances around crashing & restoring.

We won't show about:sessionrestore if that was your last session unless you tell firefox to always restore session or press the restore previous session button.

Also, I really don't want people using about:sessionrestore this way, but it works for now (see bug 467409).
(In reply to comment #8)
> (In reply to comment #6)
> > (In reply to comment #1)
> > > I'll consider this fallout, though it was something we knew going in. And
> > > historically Firefox has only ever tracked a single previous session.
> > 
> > I disagree strongly with that assessment. So long as you left
> > about:sessionrestore open when you created new tabs, Firefox had no problem
> > saving nested sessions. I took advantage of that for many moons.
> 
> You can still do that. We haven't changed the rules for showing
> about:sessionrestore so you would still see it under the same circumstances
> around crashing & restoring.
> 
> We won't show about:sessionrestore if that was your last session unless you
> tell firefox to always restore session or press the restore previous session
> button.

Yes, but the point is, this used to be automatic. Since about:sessionrestore was the only tab open when you restarted the program again, you didn't lose anything.

Now, you'd have to manually navigate to about:sessionrestore before restarting the second time, else you'll lose your previous session when it is replaced by about:home or a blank tab or whatever your preferences suggest.

Or am I missing something?

> Also, I really don't want people using about:sessionrestore this way, but it
> works for now (see bug 467409).

People who encounter or take advantage of nested sessions are generally power users, I would think, and would know that they'll have a huge sessionrestore file.

But that's not the point. The point is: in the past, you could be safe in knowing that you could close Firefox without restoring your session and still have that session waiting for you when you restart again. Now, you can't do that.

It causes unexpected data loss, and for very little gain. (What's the point in saving and restoring your default new session, if you can already create that session anew from your preferences? The whole point of session restore is to restore your old session, not your new one.)
(In reply to comment #9)
> Yes, but the point is, this used to be automatic. Since about:sessionrestore
> was the only tab open when you restarted the program again, you didn't lose
> anything.
> 
> Now, you'd have to manually navigate to about:sessionrestore before restarting
> the second time, else you'll lose your previous session when it is replaced by
> about:home or a blank tab or whatever your preferences suggest.
> 
> Or am I missing something?

It sounds like you actually just want firefox to restore your session, which will restore about:sessionrestore if it's open when quitting.

What actually changed is that we're not prompting you when quitting anymore, so you're not saying "save and quit" at that dialog.
(In reply to comment #10)
> (In reply to comment #9)
> > Yes, but the point is, this used to be automatic. Since about:sessionrestore
> > was the only tab open when you restarted the program again, you didn't lose
> > anything.
> > 
> > Now, you'd have to manually navigate to about:sessionrestore before restarting
> > the second time, else you'll lose your previous session when it is replaced by
> > about:home or a blank tab or whatever your preferences suggest.
> > 
> > Or am I missing something?
> 
> It sounds like you actually just want firefox to restore your session, which
> will restore about:sessionrestore if it's open when quitting.
> 
> What actually changed is that we're not prompting you when quitting anymore, so
> you're not saying "save and quit" at that dialog.

What changed is that restoring a session is now part of the about:home page, instead of the separate about:sessionrestore. So the problem is that about:home doesn't save your previous session beyond a single restart.

Perhaps that's because, before about:home, it just so happened that the open about:sessionrestore tab was the new session that was stored. But that's not how the user sees it, and it results in an apparent loss of functionality and, ultimately, a loss of data.

Perhaps the solution would be to reimplement the "Start a new session" button and just assume it's the same session otherwise. I don't know.

I'm not too particular about what the ultimate solution is, as long as I don't lose my previous session simply because I chose not to restore it the first time I restarted Firefox.
(In reply to comment #11)
> What changed is that restoring a session is now part of the about:home page,
> instead of the separate about:sessionrestore. So the problem is that about:home
> doesn't save your previous session beyond a single restart.

about:sessionrestore was never shown except following multiple consecutive crashes or by manually going to it.

Not saving your old session from about:home is an issue and what this bug is about. It'd sort of fix your use case as I understand it.

> I'm not too particular about what the ultimate solution is, as long as I don't
> lose my previous session simply because I chose not to restore it the first
> time I restarted Firefox.

Set Firefox to show windows & tabs from last time (first preference). And that _should_ do it.

Perhaps I'm misunderstanding what you're actually doing and want, but it sounds like your use is easily fixed.
(In reply to comment #12)
> (In reply to comment #11)
> > What changed is that restoring a session is now part of the about:home page,
> > instead of the separate about:sessionrestore. So the problem is that about:home
> > doesn't save your previous session beyond a single restart.
> 
> about:sessionrestore was never shown except following multiple consecutive
> crashes or by manually going to it.

Well, when you leave your browser open for a long time, like I do, you tend to get multiple "consecutive" crashes, because they're the only time you actually close the browser. (And I just realized, since I crashed at some point after my last comment, I don't have the about:home as my home page in this profile, because it dates back to before about:home was introduced. So I get the about:sessionrestore page as in 3.6.)

> Not saving your old session from about:home is an issue and what this bug is
> about. It'd sort of fix your use case as I understand it.

Yes, I agree with that. Our debate started because I disagreed with your claim that historically Firefox only ever tracked a single session. It became apparent over our discussion that there was a difference between perception and actual implementation which caused my disagreement. :)

> > I'm not too particular about what the ultimate solution is, as long as I don't
> > lose my previous session simply because I chose not to restore it the first
> > time I restarted Firefox.
> 
> Set Firefox to show windows & tabs from last time (first preference). And that
> _should_ do it.
> 
> Perhaps I'm misunderstanding what you're actually doing and want, but it sounds
> like your use is easily fixed.

I think you understand what I want, but you're overthinking it. Once about:home stops losing old sessions (which is what this bug is about), I should be fine. :)

Comment 14

7 years ago
tracking-firefox flags aren't for suggesting something is important. If you think it's important, work with the leads of that module to get it prioritized.
tracking-firefox6: ? → -
Duplicate of this bug: 665305
Duplicate of this bug: 673545
(Reporter)

Comment 18

7 years ago
The situation in Firefox 6.0.1: Six months - and two product versions - after first being reported, the bug remains.
Duplicate of this bug: 699651
Duplicate of this bug: 702501

Comment 21

6 years ago
I had something similar happen just now. I shut down Firefox and all of my tabs (~100), intending to reopen them later.  One window was downloading a WebEx component (I believe via a Java plugin). This plugin halted the clean exit, although most of the windows closed. 

When I restarted browser later, I clicked on the session restore button.  It restored one tab only - with the WebEx starting page on it. All of my other tabs were completely lost.

I'm running on the beta channel (14), which I realize means I should accept some problems, but this kind of data loss is painful to a tab-hoarder such as myself.

Updated

5 years ago
See Also: → bug 589095
You need to log in before you can comment on or make changes to this bug.