Closed Bug 1465558 Opened 3 years ago Closed 3 years ago

discarded tabs aren't restored (Firefox 58.0 and above)


(Firefox :: Session Restore, defect, P3)

60 Branch





(Reporter: b33j3hof3r, Unassigned)


(Blocks 2 open bugs)


User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180516032328

Steps to reproduce:

Steps to reproduce:

- Start Firefox 58+ with clean profile.
- Install "Tab Unloader (WebExtension)" 
    a) Open search site (google e.g.),
    b) Type some search query, like "test"
    c) Open ~10 links from search results. 
    d) Don't visit them (this can be important) wait for full load AND then - for automatic discarding.
- Visit unloaded tabs - some of them were "spoiled".

Actual results:

When you use an addons that unload tabs through a new tabs.discard () API,
sometimes some tabs fail to restore - 
they are empty (completely blank white page), with empty address bar, non-clickable "Back" button,
only with a title on the tab.

Addons where this problem was observed: 
- temporarily fixed by the author (see references) 
- temporarily fixed by the author (see references) 
- the problem is still observed

Some references (issues):

Expected results:

The discarded tabs are restored correctly after the resumption (selecting).
Component: Untriaged → Tabbed Browser


> "Broken" tabs

- If a tab is discarded with the WebExtension browser.tabs.discard function then the tab can be broken so that it won't restore correctly. I haven't observed any "broken" tabs from tabs that are discarded when a window is closed and then re-opened.

- I can't find any difference between "broken" tabs and "working" tabs from the information provided by the WebExtensions API, they look the same and seems to have the same onUpdate events before they are discarded.

> Behavior of "broken" tabs

- If a "broken" tab is activated or reloaded then it will change to the about:blank URL and its original URL is lost. (It has the correct URL while it is unloaded.) (This is the issue that my workaround fixes.)

- If a "broken" tab is closed then it won't show up in the recently closed tab list and can't be re-opened.

- If a window is closed and it contains "broken" tabs then the window will still be added to the recently closed windows. The entry will say that it contains the correct number of tabs but when the window is restored all the "broken" tabs will be created with the about:blank URL and their original URL is lost.

- If you close Firefox and then use "restore last session" when you start it again (either automatically or manually from the hamburger menu) then none of the "broken" tabs will be opened at all.
Component: Tabbed Browser → Session Restore

Found this bug on UnloadTabs:

Only 2 of 10 tabs restored properly (see "Steps to reproduce").
Interesting information

rNeomy ("Auto Tab Discard" author) released a temporarily fix for addon:
This fix works correctly almost always (perhaps in 99 out of 100 cases).

Lej77 ("tab-unloader-for-tree-style-tab" author) released a temporarily fix for addon,
the code for the fix is located in the common/common.js file at line 3778 in the TabRestoreFixer class:
This fix works too.

Maybe this will help somehow.
Priority: -- → P3
This sounds very similar to bug 1422588, which landed after comment 3.  Can you retest this?
Flags: needinfo?(b33j3hof3r)
no response on ni? so duping to what I think was the actual bug.
Closed: 3 years ago
Flags: needinfo?(b33j3hof3r)
Resolution: --- → DUPLICATE
Duplicate of bug: 1422588
You need to log in before you can comment on or make changes to this bug.