FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 213 forks source link

[bug] Dictionaries purged without notice #100

Closed aztavour closed 3 years ago

aztavour commented 6 years ago

After a Windows update I tried to use Yomichan (on Firefox), but it didn't work at all. So I looked in the settings to see if anything had been changed and discovered that the dictionaries I had added previously had all disappeared, as if the database had been purged. There was also no warning symbol on the Yomichan icon. I imported my dictionaries again and it seems to work just fine, but Kireicake seems to have been imported already (I get an error message and it shows up in the dictionary list), but it won't show up in the list of imported dictionaries.

lliehu commented 6 years ago

I was also hit by disappearing dictionaries. Re-added all the dictionaries again. After that it worked for a while but then the dictionaries disappeared again without notice. Using Nightly, happy to help investigate.

FooSoft commented 6 years ago

Are either of you using any other addons? Specifically anything that deals with history or cookies? Firefox doesn't make any distinction between those and the IndexedDB system in general, which is a cause of many problems.

lliehu commented 6 years ago

Using these other add-ons: Evernote Web Clipper Pontoon Tools snoozetabs Tampermonkey Test Pilot uBlock Origin

vgruppelaar commented 6 years ago

Had the same issue a few times recently. Also using Tampermonkey and uBlock, but none of the others that lliehu is using.

lliehu commented 6 years ago

By the way, I haven't had any issues for a while now. No idea why.

denyeo commented 6 years ago

I've been having the "disappearing dictionaries" problem for months :( Think it started even before I installed Firefox Quantum. I'm not sure which other addons could be causing it. It seems to happen when the browser crashes or is closed.

psychodelicwasabi commented 5 years ago

Having the same problem here. I reupload all the dictionaries again and whenever I close the browser, all of them vanish again.

Elinvention commented 4 years ago

This constantly happens to me as well, whenever I'm close to filling my small SSD. I looked around a bit and I found this https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/persist. Maybe it can be useful to better understand what's happening.

Elinvention commented 4 years ago

I tried executing the example code on that page with Yomichan's settings open. Firefox asked for my permission to allow Yomichan to use the persistent storage. Then the console showed "Storage will not be cleared except by explicit user action". Also under storage I now see "Yomichan is using approximately 0.0bytes of 1.9GB".

I will report if I lose the dictionaries again.

toasted-nutbread commented 4 years ago

@Elinvention's suggestion has now been implemented in 2bfc7e39725420a2a1a89d968b0a1f27687f70ea...70bceb5b567ade151d0299917187f4c075ea55ac. Some testing seems to indicate that this does resolve the issue with Firefox clearing data when the device is low on storage space. As for the 0.0bytes thing, I get the same thing. From this API, it looks like Firefox just reports the storage as 0, and the quota is inaccurate as well.

This is currently left as an opt-in setting, since it requires user input on Firefox. This means Yomichan probably still needs some sort of warning if dictionaries are cleared by the browser.

Aside: it doesn't seem like there's a way to revoke the permission outside of reinstalling the extension, but that probably doesn't matter.


image

toasted-nutbread commented 3 years ago

Resolving for now since these issues should be fixed, according to the documentation about how the unlimitedStorage permission works. If anyone else has this issue happen again, please open a new issue.