rNeomy / auto-tab-discard

Use native tab discarding method to automatically reduce memory usage of inactive tabs

Home Page:https://webextension.org/listing/tab-discard.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(at least) "Discard Other Tabs in This Window" doesn't work, error logged

jmbreuer opened this issue · comments

I've noticed that "Discard Other Tabs in This Window" doesn't seem to do anything any more (I'm quite sure it did work at some point in time for me). This is according to about:performance, and also none of the tabs' appearance changing (no sleep icon, etc).

When I click on "Discard Other Tabs" within "Discard Tabs in This Window", (with Logging on in Options - but probably doesn't matter, I don't see other logging from AutoTabDiscard around the error), there's an error shown in the Browser Console that seems pertinent:

Uncaught (in promise) Error: Type error for parameter queryInfo (Unexpected property "autoDiscardable") for tabs.query.
    apply moz-extension://a68f8d48-1d56-4504-9192-fa422b73cdc3/v2/chrome.tabs.query.js:4
    query moz-extension://a68f8d48-1d56-4504-9192-fa422b73cdc3/worker/core/utils.mjs:12
    query moz-extension://a68f8d48-1d56-4504-9192-fa422b73cdc3/worker/core/utils.mjs:12
    check moz-extension://a68f8d48-1d56-4504-9192-fa422b73cdc3/worker/modes/number.mjs:100
chrome.tabs.query.js:4:22

It seems that execution stops at this point, i.e. no (more) tabs are discarded.

Initially, I had a hunch that this might have to do with not-yet-loaded background tabs (i.e. those created from a middle click on a link as I have configured it ("Open in background tab"), that come up with a blue italic label, but no sleep icon, and only properly load once I activate them) - but I just created a test window with a small handful of only fully loaded tabs, and "Discard Tabs in This Window" -> "Discard Other Tabs" also fails immediately, with the above error message.

Discarding Tabs individually (i.e. just "Discard Tab") works as expected, Tab disappears from (its high-usage place in) about:performance and gets a sleep icon / blue italic tab label.

AutoTabDiscard Version: 0.6.7
Browser: LibreWolf 114.0.2-1
Additional Extension: Tree Style Tab 3.9.15
OS: gentoo Linux 6.1.31-gentoo SMP PREEMPT_DYNAMIC x86_64

Reading up on AutoTabDiscard some more, I found that I can also click on "Discard Other Tabs in This Window" from the extension (button) overlay, rather than (only) in the context menu (as I'd always accessed this before).

Using the overlay has the additional feature of holding down the shift key while clicking on the function, which causes ATD to disregard per-Tab "do not discard" settings. Using it like this, the "Discard Other Tabs in This Window" function works for me, and is an acceptable workaround for me, for now. (Holding down shift while using the context menu entry does not change anything for me.)

I guess this is because in that Shift+Click mode, that querying of all the tabs for their discard-relevant properties - which is where the error above seems to point at - simply does not happen at all.

I have the same problem with all the actions that should disable several tabs at once

Same issue here in Opera. I tried both operas and chromes latest versions.
The workaround is working.

Unrelated, the extension "Tab Discard (Suspender)" is able to discard a tab whilst you're still on the tab without having to open another tab to stop it from reloading. Something you can look into if you'd like :)

Thanks a bunch for the well featured extension!

Hayden.

Also for me (Firefox 120.0 - 64-bit) most function-buttons don't work:

"Discard Tab" works, but only on the displayed tab or on the tab from which the context-menu was created

"Discard Tab Group" does work partially, as it behaves more similarly to a "Discard Multiple Tabs":

  • discards (formal) groups of tabs from TreeStyleTabs ✔️
  • discards the multiple selected tabs (either siblings or sparse, doesn't matter)
    • but only if the action is chosen from the overlay in the extension-function
    • when triggered from the contextual-menu of 1 tab, it will always discard only that single tab, even if multiple tabs were selected.
  • does not discard (anymore) the selected tab + the sibling tabs contained under a parent tab, in a TreeStyleTabs branch ❌ (it used to work in the past: considering tab-branches as group)

"Discard Tabs in This window" does not work

"Discard Tabs in Other windows" does not work

  • it only creates a new tab (as child of the currently selected tab, in TreeStyleTabs) with the same title as the currently selected tab and content "All tabs in this window are discarded! Click anywhere to close this tab and switch back to the last active tab".
  • nor the selected tab of that window (from which the title is copied) or any other tab is being discarded

Also "Discard All Other Tabs" does not work

I'm not sure where should I check logs for reading potential errors.
Dunno how but ideally I could restore an old version of Auto Tab Discard: in the past most of the functions used to be working fine.