arifwn/TinySuspender

Tabs vanish when uninstalling the extension

Opened this issue · 5 comments

In the default configuration, when I deactivate/uninstall the extension, all suspended tabs vanish.

The vanished tabs don't even come back when I reactivate/reinstall the extension.

I understand that this is a limitation of the suspension technique used, and I as a user can prevent this behaviour by switching the experimental discard technique on.

But the big problem is that the tabs vanishing comes totally as a surprise to users.

A quick fix would be:

  • On first use of the suspension feature, inform users that uninstalling/deactivating the extension will vanish the suspended tabs.

Advanced fix:

  • On deactivation/uninstallation of the extension, convert the tabs back to normal tabs. Technically, this can be sufficiently accomplished by listening to the "unload" event of the extension's background page (although the event also fires on other occasions, but this shouldn't be a problem).

Thanks for the suggestion! As the author I didn't realize this could be an issue since I never uninstalling this extension.

:(
Why does it close alle tabs when deactivating TinySuspender?? o_O
I just lost 80 tabs!

You have to implement options to backup the tabs.
Backup when closing Addon or Browser.

Better it would be able not to loose all tabs but use a technique that Opera and all other addons do understand to handle them as normal tabs.

Good luck! :)

ps: There are other Suspender-Addons which can handle this problem better.

arifwn commented

Unfortunately, extensions can't listen for their own uninstall event at the moment, so TinySuspender won't be notified when it got uninstalled and can't perform cleanups such as waking up all suspended tabs.

For now, I'm putting a warning about this behavior in the settings page.

I'm open to suggestion, but our options seems to be limited. With the move to Manifest V3, hooking into the "unload" event like erlendorf suggested above is no longer viable. Saving the list of suspended tabs and restoring them when the plugin is re-installed seems to not viable as well because Chrome wipes out extension data on uninstall. Storing this data remotely might work, but I prefer to keep this extension completely offline.

I'm open to suggestion though. If there are other extensions that handle this better, I'd love to look into them.

Auto Tab Discard
shall do it and all suspended tabs can be loaded even by uninstalled addon:
https://webextension.org/listing/tab-discard.html

TinySuspender has native tab discard support that can be enabled in the settings panel by ticking the "Use Native Tab Discard API" checkbox. When using this option, uninstalling the extension won't remove the suspended tab. Using the native tab discard means sacrificing certain functionalities though (e.g. limited control over suspending active tab and waking up background tabs), so it's not without drawback.