buttercup / buttercup-browser-extension

:earth_asia: Buttercup browser extension
https://buttercup.pw
MIT License
228 stars 42 forks source link

Dynamic icons pop-up keeps coming back #367

Closed gerrygralton closed 3 years ago

gerrygralton commented 3 years ago

The dynamic icons pop-up tab comes back every single time I open a new browser. You can select either disable or enable and it disappears but if that browser window is closed when I reopen it the pop-up will come back again.

I'm using Ubuntu 20.04 with Mozilla Firefox 80.0.

perry-mitchell commented 3 years ago

This should save to a session variable, which is saved in your browser session. If your session doesn't keep that variable, then it will prompt again the next time.

The popup was a courtesy feature as we didn't want to force everyone to use the default setting of on for dynamic icons. But perhaps the solution here would be to simply force it to default to on and remove the popup.

frederic-klein commented 3 years ago

Same setup as Gerry Gralton (Ubuntu 20.04, Firefox 80.0), same problem: the settings value is shown empty after restarting firefox, so it doesn't seem to be persisted.

on change debugger console shows:

Unchecked lastError value: Error: QuotaExceededError: storage.sync API call exceeded its quota limitations.
setValue moz-extension://e634083f-cdf5-4222-9586-d6ab13c7e8cb/background.js:1

Might be related to: https://blog.mozilla.org/addons/2020/07/09/changes-to-storage-sync-in-firefox-79/

await browser.storage.sync.getBytesInUse(
  "bcup_archivecache_a4ef4fb8-90e3-4b7b-af25-eb9847a6f367"
);

Seeing 477356 which exceeds 102400 (QUOTA_BYTES)

jokeyrhyme commented 3 years ago

Happening for me, too OS: Archlinux Firefox: 80.0.1 (64-bit) Extension: 2.21.0 Vault: Google Drive w/ permission only for its own files

perry-mitchell commented 3 years ago

I think for now we'll default the setting to on. Expect an update soon - We'd also except a PR in the next 12+ hours in case someone wants to speed up the process.

frederic-klein commented 3 years ago

@perry-mitchell this would only fix the message coming back, but the underlying issue remains: it seems, adding vaults has the same problem; when I add my vault (dropbox) it works until browser restart; on the other machine it probably works, because the firefox upgrade migration allowed exceeding the quota for existing data, while new data is not persistent. Can't find any settings to increase limits in firefox. Why is the sync storage used anyway, when sync is not even enabled in firefox?

frederic-klein commented 3 years ago

Tried further debugging (about:debugging#/runtime/this-firefox then inspect buttercup) and I had a large entry for bcup_archivecache_...

await browser.storage.sync.get();

I cleared the storage

await browser.storage.sync.clear();

And now settings, vaults and vault updates are stored again, no quota errors. So problem might be caused by source/tools/vaultManagement.ts, but for now it is fixed for me.

perry-mitchell commented 3 years ago

Good point, regarding the quota! Something that we could consider checking. The vault caches should be stored locally, and not in the sync storage - this was changed a while ago but perhaps the cleanup hadn't run correctly.

Anyway, I've released v2.23.0 that removes the nagging popup. We default the setting to enabled now.