Closed Bug 1232955 Opened 9 years ago Closed 9 years ago

Websites with no cookies allowed are not restored (blank tab) after restarting Firefox

Categories

(Firefox :: Session Restore, defect)

43 Branch
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 1234021
Tracking Status
firefox44 --- wontfix
firefox45 + wontfix
firefox46 + wontfix
firefox47 + fixed

People

(Reporter: primexx, Unassigned)

References

()

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36 Steps to reproduce: Summary: The "Undo Close Tab" function fails spectacularly and unpredictably when cookies are disabled. It does not remember most tabs, but occasionally remembers one here or there. I have not been able to determine a pattern or potential cause. Affects: This issue just started with Firefox 43.0. I have tested it with a brand new profile on: Windows 8.1 43.0 x64-EME-free en-GB, and Windows 7 43.0 x86 (regular) en-US. Note: I have not yet been able to determine the precise scope of the issue, it is somewhat unpredictable. I will outline the most reliable way to reproduce that I have been able to find so far. Steps to reproduce: 1. Make a brand new profile 2. navigate to about:preferences#privacy and un-check "Accept cookies from sites" (alternatively, set 'network.cookie.cookieBehavior' to 2) 3. restart to be sure 4. open a webpage with some links (e.g. reddit) [call this Tab A] 5. open any link in a new tab [call it Tab B] 6. switch to that tab [Tab B] 7. once more, open any link in a new tab [call it Tab C] You should now have 3 tabs open: [Tab A - the original page], [Tab B - the first new tab you opened from Tab A], [Tab C - the second new tab you opened from Tab B] it doesn't matter which tab you have focus on 9. close the second tab [Tab B] 10. pull up the tab context menu (right click on a tab, or an empty area on the tab bar) Actual results: The "Undo Close Tab" option is greyed out: it did not remember the closed tab. Expected results: The "Undo Close Tab" option should have remembered the closed tab and been available. It worked as expected prior to Firefox 43.0. Variations: there are some variations to the above steps that I will now describe. This is NOT an exhaustive list. 1. If you follow the above steps but at step #9 close the first tab [Tab A] instead, "Undo Close Tab" will be available, but it will re-open the Firefox Start Page rather than the webpage you had before. 2. If you follow the above steps but at step #9 close the third tab [Tab C] instead, "Undo Close Tab" will be available, and it will correctly re-open [Tab C]. It doesn't matter if you first drag to re-order the tabs. This might seem like it is working on the most-recently-opened tab, however, further tests have indicated that it does NOT always work for the most-recently-opened tab when I had opened up more tabs in various permutations. Conversely, it does NOT always fail for non-most-recently-opened tabs. Those two conditions appear to occur together, but I am not certain about that.
Severity: normal → major
Component: Untriaged → Tabbed Browser
OS: Unspecified → Windows
Hardware: Unspecified → All
Component: Tabbed Browser → Session Restore
I'm not able to reproduce the issue with a clean profile.
I created a screen recording of the steps described in the initial report.
Attachment #8699158 - Attachment description: Screen recording of issue → Screen recording of issue. Brief description: 1. first I created a new profile 2. I go to options to make it not accept cookies 3. restart 4. open up reddit.com 5. show that there is no "Undo Close Tab" entry yet (correctly) 6. open u…
Comment on attachment 8699158 [details] Screen recording of issue. Brief description: 1. first I created a new profile 2. I go to options to make it not accept cookies 3. restart (by closing every tab) 4. open up reddit.com 5. show that there is no "Undo Close Tab" entry yet (correctly) 6. open a link in a new tab 7. show that there is no "Undo Close Tab" entry yet (correctly) 8. in the new tab, open up a link in a new tab again 9. show that there is no "Undo Close Tab" entry yet (correctly) 10. close the second tab 11. there is still no "Undo Close Tab" entry (incorrect) 12. close the original tab 13. "Undo Close Tab" re-opens the wrong content 14. show that there is no remaining "Undo Close Tab" entries at this point 15. close the third tab 16. "Undo Close Tab" correctly re-opens this tab THIS TIME. in other scenarios it may not correctly re-open the most recently opened tab either.
Attachment #8699158 - Attachment description: Screen recording of issue. Brief description: 1. first I created a new profile 2. I go to options to make it not accept cookies 3. restart 4. open up reddit.com 5. show that there is no "Undo Close Tab" entry yet (correctly) 6. open u → Screen recording of issue.
Sorry for the multiple replies. I wasn't familiar with the commenting system. It appears that there's no way to edit a comment. I've added a video recording of the issue on a new computer. The useragent of this one in the video is: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0 it is also an EME-free version. Please see Comment #3 for a description of what I did in the video.
I have updated to 43.0.1 and then 43.0.2 x64 regular (not the EME-free) en-GB version. The issue of not properly undoing closed tabs still persists, but I am no longer able to consistently re-produce the issue with the steps I outlined before. I have yet to find a new pattern.
I've reported a similar issue in bug 1238178. Could you please test whether your problem occurs with specific web page URLs, and not with other ones? Also, whether you have other problems, eg. with the Back button history menu, missing entries in Recently Closed Tabs/Windows, or failures in session save/restore? Another part of the pattern may be that the first tab in a window is opened from the Firefox Start Page, while subsequent tabs get opened from the New Tab page. That makes the first tab different, in terms of its history in session store, as the Start Page is treated like a regular web page, while the New Tab page is treated a bit differently.
Flags: needinfo?(primexx)
Yes, it looks like the bug you've reported is related to mine. I looked at the results you reported: - the Back button's history drop-down menu may not contain entries for the pages, or the menu may become inacessible, or show an incorrect position. confirm - when using "Show my windows and tabs from last time", a history entry for the page's URL, title, etc., is not recorded to sessionstore.js on quit. After restart, the previously-visited page in the tab's history is displayed instead. did not test - if the tab is closed, the Undo Close Tab menu item is grayed out, and an entry in the Recently Closed Tabs menu is not created. confirm-sorta. see below. - if a window with a tab containing one of the pages is closed, an entry in the Recently Closed Windows menu is not created, and its entry in sessionstore.js is not moved to the "closed windows" section. After restore, the closed window is re-opened. I don't understand this. -- I have all tabs open about:home, and the bug occurs unpredictably across all tabs. So I do not suspect anything caused by the about:home vs about:newtab difference. Since the 43.0.1 update I have not been able to create 100% reproducible steps. The problem is very common (such that I can't rely on Undo Close Tab anymore) but seems to be completely unpredictable. everything I've observed is consistent with your observation of the Undo Close Tab function, but I can't reproduce it on demand (though it shows up very quickly in normal use). I have also noticed a new hint: I switched to Tab Mix Plus' session manager and the issue still remained. That means either a) TMP does not actually completely replace the Firefox session manager, or b) the root of the issue is not, or at least not exclusively, a session manager issue.
Flags: needinfo?(primexx)
See Also: → 1238178
(In reply to primexx from comment #2) > Created attachment 8699158 [details] > Screen recording of issue. > > I created a screen recording of the steps described in the initial report. The video doesn't work. If you want to make a screencast, there is https://screencast-o-matic.com/home (need Java plugin installed).
primexx, you wrote: "I have all tabs open about:home". This is not possible with a clean profile on Firefox 43. Since FF 41, an addon is required. Could you clarify? I can reproduce the following behaviour with 43.0.2, Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 Firefox/43.0 The errors occur consistently with specific "bad" web page URLs, including microsoft.com and reddit.com, but not with others, such as mozilla.org. The pattern is: if a tab with a "bad" URL is closed, then choosing Undo Close Tab will restore the tab to the previously-visited site in the tab's history, which may be the Firefox Start Page. If the tab has no previous history, i.e. it was opened directly from the New Tab page, the Undo Close Tab option will not be available. Steps to reproduce: - create a new profile, and uncheck "Accept cookies from sites". - close the window, and open a new one. The Firefox Start Page is displayed. - enter reddit.com into the address bar. - open a second tab, the New Tab page is displayed, enter mozilla.org - open a third tab, enter mozilla.org, and after it loads, enter reddit.com - open any number of additional tabs, entering reddit.com in each. - close all tabs except the first three. Note each time that the Undo Close Tab option is not available. - close the third tab, choose Undo Close Tab, and note that mozilla.org is displayed instead of reddit.com - close the second tab, choose Undo Close Tab, note that mozilla.org is correctly restored. - close the first tab, choose Undo Close Tab, note that the Firefox Start Page is displayed instead of reddit.com The behaviour in FirefoxNightly 46.0a1 is similar, but less consistent. Sometimes reddit.com tabs opened from New Tab and then closed, will show Undo Close Tab and restore, sometimes not. Tabs with history still seem to consistently restore to the previous page.
(In reply to Loic from comment #8) > > The video doesn't work. If you want to make a screencast, there is > https://screencast-o-matic.com/home (need Java plugin installed). It's an mp4; I downloaded it again and re-uploaded to https://vid.me/0OOa (In reply to Elhem Enohpi from comment #9) > primexx, you wrote: "I have all tabs open about:home". > This is not possible with a clean profile on Firefox 43. Since FF 41, an > addon is required. Could you clarify? Yes I observe the issue on my own profile and then verify that it also exists on a clean profile. Some of my configuration can yield additional information regarding the observed behaviour (such as Tab Mix Plus's alleged session manager also exhibiting the same issue, described above). > I can reproduce the following behaviour with 43.0.2, > Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:43.0) Gecko/20100101 > Firefox/43.0 > > The errors occur consistently with specific "bad" web page URLs, including > microsoft.com and reddit.com, but not with others, such as mozilla.org. The > pattern is: if a tab with a "bad" URL is closed, then choosing Undo Close > Tab will restore the tab to the previously-visited site in the tab's > history, which may be the Firefox Start Page. If the tab has no previous > history, i.e. it was opened directly from the New Tab page, the Undo Close > Tab option will not be available. > > Steps to reproduce: > ... > I followed your steps to reproduce and can confirm the exact behaviour you described, and can consistently reproduce it. 43.0.4: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:43.0) Gecko/20100101 Firefox/43.0 The reason I suspect that it's not confined to specific URLs is because reddit links externally, and those external links behave inconsistently. However, I suppose the difficulty we have is that since we don't have a complete list of potential "bad" websites, the behaviour of unconfirmed "bad" sites can't be distinguished for just a general, random, bug. What IS very probable, I think, is that we're all seeing the same or at least a common set of bugs that's causing everything we've observed.
OS: Windows → All
Through further normal usage, it does seem like some sites are "regulars" with the issue, while other sites don't seem to be. Relating to Elhem Enohpi's report. I've also been able to see the same problem in a Linux Mint VM. Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0
Fyi, I created a couple of bare-bones HTML pages for testing. They both run exactly the same JavaScript code that simply accesses sessionStorage. The first one runs it when the page loads, and consistently causes a security error in SessionStorage.jsm, which produces the Undo Close Tab malfunction. The second one runs it when you click a button, and behaves correctly. I have no idea why that is. https://d.maxfile.ro/rbbidjxuiv.html https://d.maxfile.ro/wkxfsryicj.html
(In reply to Elhem Enohpi from comment #12) > Fyi, I created a couple of bare-bones HTML pages for testing. They both run > exactly the same JavaScript code that simply accesses sessionStorage. The > first one runs it when the page loads, and consistently causes a security > error in SessionStorage.jsm, which produces the Undo Close Tab malfunction. > The second one runs it when you click a button, and behaves correctly. I > have no idea why that is. > > https://d.maxfile.ro/rbbidjxuiv.html > https://d.maxfile.ro/wkxfsryicj.html Thanks, these links are helpful. In fact, with the 1st link, the tab is never restored after restarting Firefox with the option "Accept cookies from sites" unchecked. FF44 is affected, Beta too and Nightly too. Regression range: https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=cadeefe3e92791a426c3e950b78e4a38a7093e9a&tochange=1056ac371c0468cde5600a7c5765dc170c5f77e5 Bobby Holley — Bug 1201747 - Don't inspect the subject principal in StorageAllowedForPrincipal. r=mystor
Blocks: 1201747
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(bobbyholley)
Keywords: regression
Summary: Undo Close Tab Broken When Cookies Disabled → Websites using sessionStorage are not restored (blank tab) after restarting Firefox with no cookies allowed
Bug 1201747 was just fixing a mistake in bug 1184973, so given the regression range, that's the real culprit here.
Blocks: 1184973
No longer blocks: 1201747
Flags: needinfo?(bobbyholley) → needinfo?(michael)
I think I've figured out what's causing this - discussing potential solutions in bug 1245595.
Depends on: 1245595
Flags: needinfo?(michael)
Tracking, recent regression (from 43)
Regression since 44 but this still doesn't have anyone assigned and 46 is about to move to beta. Wontfix for 45 and 46. If we do come up with a fix and someone feels strongly about this, please let a release manager know or just needinfo me here.
I believe this is already fixed in 46 by bug 1234021.
(In reply to Elhem Enohpi from comment #19) > I believe this is already fixed in 46 by bug 1234021. I believe it should be fixed by that, yes.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Summary: Websites using sessionStorage are not restored (blank tab) after restarting Firefox with no cookies allowed → Websites with no cookies allowed are not restored (blank tab) after restarting Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: