-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to update dictionary data #155
Comments
@rplasson Thank you so much for this report! I'm really sorry to have introduced this problem. I have been trying to fix problems some have faced recently (see #148) but I suspect today's update made it worse for some. I have an idea to try to fix this which I will try tomorrow. Please bear with me for another day while I try to work out what is going on. Thank you again for your report and patience. |
You can tell if the update has worked by hovering over 弄. If you see an entry for
This part has me baffled. The errors I am seeing being logged are for partial updates making me think the underlying the transaction has not completely finished somehow. But if at some point (through switching languages back and forth) you are able to make it succeed, then on a restart it shouldn't need to apply any further updates. So I'm not sure why the error would appear on a restart. Currently the add-on will automatically retry if there is a network error but it doesn't retry for database errors. It's possible that writing to IndexedDB is just flaky sometimes and it needs to retry for certain database errors too. That would explain why switching languages helps since that will actually cause it to retry. For now I've released 0.1.12 which fixes a couple of things but mostly adds more logging so I can hopefully understand a little better what is going on. |
I got one interesting error report with the following sequence:
The curious thing here is that even after successfully updating the database it goes and tries to update it again. It's possible we somehow picked up the wrong language from the config, set it back to More likely, however, the double abort at the end is the key. I suspect we have overlapping calls to The other observation is that after adding more fine-grained logging, I see that we are hitting a Digging into the Firefox source there are only a handful of places that throw IndexedDB constraint errors. In this particular case, the most likely seems to be that we are getting a This situation doesn't seem to overlap with the above potentially overlapping updates situation at all. Furthermore, I can see that it happens on different partial updates. I suspect it might just be a "retry until it works" situation. Something to try tomorrow. |
SO:
I can reproduce these steps by randomly switching back and forth between languages, when the update stalls, the update is actually working. Trying another modification, the update failed error appears again. |
I also obtained once another "Update failed: Database version (1.1.2) is older than current version (1.1.3) Retrying at..." after random language changes... |
Great, thank you again!
This much is sort of expected. Version 0.1.12 simply exposing the actual underlying error properly, i.e. the The bit I don't understand it why it tried to update at all. Presumably your existing install should have already been up-to-date. And of course, I have no idea why this
Again, presumably your existing install should have already been there so I don't know why it needed to update.
The [!] icon should disappear while it's still checking for updates. I'm not sure why it got stuck though.
Did it start working by itself? Or did you restart Firefox or something?
I tried this over and over again today but unfortunately couldn't reproduce the problem. Can I ask how you know the update is actually working?
That's quite odd. It shouldn't happen but it suggests something is racing. I have to dig into the scenarios that could cause that tomorrow. The other things that puzzles me is this only ever seems to happen when applying the subsequent patch updates. The initial update never seems to fail. Thank you so much for all the extra information. This is still quite a mystery to me, but I hope I can make more progress tomorrow. |
I was diagnosing some other unhandled errors and tracked them down to extension storage failing. Specifically methods like After adding logging for these methods it turns out that the users that are hitting them appear to correlate closely with the set of users who are hitting either these It's not entirely clear if IndexedDB is temporarily unavailable or if something about the users's configuration means it is thoroughly broken but I suspect it's the former because:
So I think the best we can do here is do a few retries for both opening the database and writing to it. My guess is these things happen often at startup because there is contention for some resource (there is also some sort of correlation with users who are encountering errors loading the datafiles into memory) so if we can wait a few seconds between retries we might have more luck. Somewhat unrelated, as of version 0.1.14 I've made the add-on hide the exclamation work when a patch update fails (since we still have a workable database we can use) so hopefully this is already a little less distracting for the user. |
Well, this is now working for me with version 0.1.14, no more update errors. Note that when I checked the dictionary version, it was actually at 1.1.0 after firefox restart, but I could up hit the "Check for update" to upgrade it flawlessly to 1.1.3 (and the 弄 kanji is indeed seen correctly). |
I'm really glad to hear that it is working properly for you now. Your information has been most valuable. Thank you! In the process of digging into this, I have come up against some problems with the current setup so I am currently working on a fairly thorough overhaul of the update checking which I hope to release next week. Hopefully I don't make things worse in the process. |
I'm closing this for now since I believe this is as fixed as it's going to get. The main outstanding issue is permanent private browsing but that is tracked in #148. |
Since the update of 10 dec 19, the dictionary fails to update. A warning is set on the icon stating "Failed to update dictionary data". Manual attempt to update the dictionary from the preferences (Kanji directory, "Retry" button close to the error message) gives the following error" "Updated failed. A request was aborted, for example through a call to IDBTransaction.abort". The error can disappear when (randomly) switching back and forth languages and hitting the retry (I installed both english and french dictionaries), but comes back after firefox restart.
Beside the update problem (or the update error problem; as far as I know, the update may have been correctly processed while an erroneous error message is raised), the app works correctly.
The text was updated successfully, but these errors were encountered: