Closed Bug 656062 Opened 11 years ago Closed 11 years ago
Fennec fails to consistently maintain session after being unloaded by Android
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:18.104.22.168) Gecko/20110420 Firefox/3.6.17 Build Identifier: 4.0.1 (also tested in Fennec 6.0a 20110510) Fennec does not maintain session consistently- On Android devices, an app running in the background (analogous, from a user perspective, to a minimized desktop app) may, depending on unpredictable factors, be terminated by low-level OS operations to reclaim memory. Fennec seems to be handling this as a "crash" and only restores the session if the user starts it within one hour. Instead, Fennec should always restore the session, unless it was explicitly exited by the user, to maintain a consistent and logical user experience- essentially, the app should not appear to the user to have been closed, unless the user actually closed it. A side-effect of this bug was previously reported as Bug 653949, and there is some discussion there related to this issue. Reproducible: Always Steps to Reproduce: 1. Start Fennec and open some tabs 2. Switch away and run some memory-intensive apps so that Fennec is unloaded by the OS 3. Wait more than an hour 4. Start Fennec again Actual Results: Fennec goes straight to the homepage, as if it was exited by the user. Expected Results: Fennec should still load the session automatically despite an arbitrary amount of time having passed, hiding from the user the confusing fact that it was unloaded by the operating system. The only cases it should not restore the session automatically are when it is explicitly exited (currently, only possible from an addon) or perhaps when the phone was rebooted in the meantime (as it may seem odd to the user that a browser "kept running" when the device was off). A side-effect of this issue is that it is possible to actually lose session data completely if the issue is triggered when Fennec is started by opening a link from another app, which is a rather serious loss of functionality. The workaround is to load about:home, but this is non-obvious as the session will just seem to have disappeared.
This is in fact exactly what Fennec is supposed to do. The "timeout" for session is here: http://mxr.mozilla.org/mozilla-central/source/mobile/app/mobile.js#135 After 1 hour (60 minutes) Fennec is designed to "forget" the last session.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Please read the use case and discussion in Bug 653949 again- Firefox is indeed designed to do this. Having the browser forget session on Desktop after 60 minutes is the correct thing to do, as the session restore is used to recover from a crash, and presumably if the user has not recovered it by then they aren't going to. Please note, however, that this is a mobile-specific bug. Having the browser forget session on Mobile after 60 minutes is the incorrect thing to do, as the session restore is used to keep the browser running in background ("minimized"). Firefox for Desktop does not terminate itself after 60 minutes. The default Android browser, Opera, and Safari on iPhone do not terminate after 60 minutes. Nor should Firefox Mobile. The fact that the underlying OS really does terminate it is an OS memory management issue that should be hidden from the user- all other Android browsers do this correctly, using some kind of session persistence. Perhaps it would be clearer with a more real-world test case- Steps to Reproduce: 1. Start Fennec and open some tabs 2. Receive a phone call and talk for more than an hour 3. Hang up Actual Results: Fennec acts like it was closed. Expected Results: Fennec presents the tabs that were open before the call, just as the default/Opera/Dolphin/etc browser does.
Kevin can we have your input on this?
Is there any intent to fix this? The issue is most certainly not "Invalid"- the browser is indeed designed to do this, but that doesn't automatically make that the correct action. "Its a bug, not a feature."
So what's going on with this bug? It would be nice if fennec had the same worry-freeness as its desktop version or indeed mobile chrome.
This is a dead bug. It was filed against a product that ceased development in Firefox 10. New issues should be filed against https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox%20for%20Android
(In reply to liam from comment #5) > So what's going on with this bug? > It would be nice if fennec had the same worry-freeness as its desktop > version or indeed mobile chrome. This bug is about a "one hour timeout" in session restore, which was fixed long, long ago; the underlying unreliability of session restore is indeed still present, so I filed Bug 852267 with updated info.
(In reply to CoJaBo from comment #7) > (In reply to liam from comment #5) > > So what's going on with this bug? > > It would be nice if fennec had the same worry-freeness as its desktop > > version or indeed mobile chrome. > > This bug is about a "one hour timeout" in session restore, which was fixed > long, long ago; > the underlying unreliability of session restore is indeed still present, so > I filed Bug 852267 with updated info. Ah, thanks so much CojaBo and kbrosnan.
You need to log in before you can comment on or make changes to this bug.