ghostery-extension: Ghostery cannot persist values (startup hangs / values are not flushed)
Update May 16th 2022: I changed the title; from what we learned, it is not a browser bug. Most likely we have a logical bug in the initialization code, which prevents values from being written to disk.
This issue is track a class of rare errors, where the profile gets corrupted and the extension is unable to persist values. It should not be mixed with another related problem: if the extension exceeds the 5 MB quota in chrome.storage.local (enforced by Chrome, not by Firefox), it is a logical bug in the extension code. But if browser’s API fail (e.g. by running out of disk space, by a browser bug, or by bugs in wrapper libraries like Dexie), it is hard to recover.
Here is an example how such an error can be spotted in the logs:
Cliqz [warning] Storage not available, fallback to in-memory DOMException: IDBDatabase.transaction: 'kv' is not a known object store name
That means, the extension is unable to write to disk (here is the code).
The class uses the Dexie library internally (PersistentMap), which is a wrapper over IndexedDB not chrome.storage.local. But if writing to IndexedDB fails, it is likely that writing to chrome.storage.local is also affected. Since you could confirm that settings are not persisted, I think it is outside of the control of the extension. Perhaps create a copy of the profile, but I think you have to reinstall the extension. (In 2019, I remember we had a weird issue where Dexie only failed if devtools were open. Though here, I cannot locally reproduce. We had a blog post about it: https://whotracks.me/blog/dexie_transaction_bug.html)
Up to discussion, but since we should be able detect it programmatically, maybe we should show some warning in the UI?
_Originally posted by @tsmorrill in https://github.com/ghostery/ghostery-extension/issues/500#issuecomment-1112149526 and by @philipp-classen in https://github.com/ghostery/ghostery-extension/issues/500#issuecomment-1112212691_
First reported on Firefox 99 and Ghostery 8.7.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 26 (9 by maintainers)
I really was glad to help; look how this paid off 😊
Thanks!
From: Krzysztof Modras @.> Sent: 22 July 2022 12:46 To: ghostery/ghostery-extension @.> Cc: Rubiqua @.>; Mention @.> Subject: Re: [ghostery/ghostery-extension] Ghostery cannot persist values (startup hangs / values are not flushed) (Issue #777)
Thank you very much @Rubiqua https://github.com/Rubiqua - you help is much appreciated!!
— Reply to this email directly, view it on GitHub https://github.com/ghostery/ghostery-extension/issues/777#issuecomment-1192441437 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AY7NNENSWZCFHDRKTLBM5BLVVJ3WLANCNFSM5USQM3IA . You are receiving this because you were mentioned.Message ID: @.***>
Thank you very much @Rubiqua - you help is much appreciated!!
Thank you for persevering and fixing this, this is very encouraging 💖 I felt a sparkling hearty is in order for the indeed ‘dedicated and uncommonly attractive team’ that worked hard to resolve this. I don’t have the pop-up so far and kept a screenshot whenever I feel nostalgic 😊 Thanks a bunch!
Looks like Ghostery update to version 8.7.4 resolved all the “settings don’t persist” issues on Firefox for me. No more naggy persistent update popup on startup of Firefox. All settings changes and update date are kept even after I close out and reenter Firefox. Good job. Thanks for keeping this extension going.
Sorry to be back so late; today is quite hectic with lots of Stuff Going On.
This didn’t fix it for me either.
Launching the browser by clicking on a link works fine, no pop-up. But as soon as choose to sign in the pop-up appears. It is now so much ‘part of it’ that I fear I sometimes won’t even notice since it goes away by opening a third link (as is the case when actually logging in).
In short: initial window after clicking on a link > no pop-up, clicking on a link on the opened page > pop-up, going to third page > pop-up disappears automatically.
I am frustrated but am also getting amused. I feel we may solve this. I will send an email about time and availability to do a debugging session.
I tried what Rubiqua said (no background Firefox task running and with a new Ghostery installation, but it didn’t fix the problem for me.
Also, running
ghostery.checkStorage()returned this:I am using Firefox 99. Uninstalling Ghostery, closing Firefox, then reinstalling Ghostery does not fix the bug.
Creating a fresh profile and installing Ghostery does not exhibit this bug.
@tsmorrill @N3tFX this is definitely annoying, we are sorry that this happens to you. Can you please confirm on which browsers you are? If on Firefox, could you please be so kind and try to install Ghostery on a new profile? Inability to use storage is a symptom of a rare bug critical problem of profile corruption. It may be that non of extension is able to use storage which can lead to variety of unexpected problems. As said, this is very rare, but would be great to exclude this from the list of potential problems.
This happened to me also. After re-install, instead of the Ghostery popup, I get the even more annoying Ghostery Hub - Upgrade tab at every startup. The worst thing is that it no longer saves the user settings (about trackers etc.), so it doesn’t block anything anymore. For now, I’ve just completely uninstalled Ghostery.
Per discussion in the linked issue, I have uninstalled and reinstalled Ghostery. This has fixed the issue where Ghostery shows the version update popup every time the browser is opened.
Instead, Ghostery opens a new tab to display the Ghostery Hub - Upgrade Plan page. Settings not persist.
The debugger does not show the Cliqz
Storage not availablewarning.