-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
AnkiDroid fails to sync when there is a card with due > 1000000000 [or some other unknown reason] #5728
Comments
Nevermind. Looks like there's something else. I have just:
Well, I'm just going to review without rescheduling on ankidroid until tomorrow, and will attempt to work more with you to attempt to debug that issue later on. If there's anything I can do to help (eg. provide the full deck in private message to someone, as it contains vocabulary I don't own the copyright of), feel free to tell me what and how! |
Hey @mikehardy, thank you for your answer! I'm not sure about a relationship with the PR I sent through as, as far as I understood the code, it was supposed to touch only the displayed number -- but then, I totally might have been wrong. As an additional data point: if I try to upload from ankidroid when it's giving me the local|remote, it freezes for a while on “Checking file before upload...”, then eventually fails without further error message (though I've just left the phone unattended for 30 minutes, so maybe there was a transient error message I couldn't read). Also, I've heard of a friend who also from time to time has an issue with similar symptoms, and after a few days it self-resolves -- not sure at all whether that's related, though, nor whether there may not have been another reason for that failure, for they're not particularly proficient with computers. The “it self-resolves” part of it would make me guess it might be linked with an error on the server side, but it can also be a red herring, and the fix can also come from doing additional reviews, maybe. As I'm at a loss about how to debug this further, having done basically no android app development yet (apart from said PR, which I did “blindly”), maybe I could send you my .colpkg by email or similar, so that you could try to reproduce the issue in a proper android dev setup, and thus debug it more easily than through me? :) |
Huh? I had re-attempted the “upload” choice while writing this message, and this time it did succeed in uploading, just after I clicked “send”. I have literally no idea what's happening, sorry… So what happened is (all from ankidroid):
|
Oh by the way, having
So, as far as I can read, nothing of interest here, unfortunately. |
Having succeeded in the full sync, I've just checked on anki that I could download from ankiweb and then sync properly, and it worked without a hitch, and “Check Database” returns nothing, so I guess the issue is not just in ankidroid's internal database -- though I guess removal of the ankidroid folder + reinstallation also had verified that issue, it's still a second confirmation that it appears to be dependent only on the state of the collection. |
Whatever is happening between line two and line three here, where AnkiDroid determines a full sync is necessary, is the vital information. Being a bit lazy and knowing that brute force does in the end solve things I would log statements all over the place in that code path, documenting the full logical journey and the internal state in place during it, to watch what's happening then it should 🤞 be obvious? |
@mikehardy Do you know of a good crash course on how to compile ankidroid from source and load it onto the phone? Never having done any real android development, I have no idea how to do it yet. |
Looks like these days the bug is blinking, sometimes happening and sometimes not, depending on how many cards I review. Unfortunately, as you can see from the delay between my answers, I don't have much time right now, but I've saved a .colpkg from the time it was completely broken, and will try to investigate that when I can find some time, if no one beats me to it and asks me for the .colpkg! |
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically |
Oh, I forgot to close this: at some point a few months ago the changelog had a mention of a sync bug being fixed, and since then I haven't had the issue, so let's assume the issue is solved and close :) |
It looks like when there are cards with a too high due value (I had stuff with due > 1.500.000.000, no idea how it came to be in the first place, despite the fact I've been using anki{,droid} for years and have maybe 100-200k cards total it's still several orders of magnitude more), ankidroid refuses to sync changes, and states that the database is corrupt.
It's been happening to me even after full syncs, as well as after a reinstall and removal of the AnkiDroid folder, with just the sync parameters set, so not related to configuration I think.
The issue vanished at the time I used reposition on anki on all is:new cards that were not filtered, and then forced a full sync. As “Check Database” on anki had raised the “too big due values”, I assume that's likely the reason why ankidroid failed to sync.
I'm on the current f-droid version, which appears to be 2.9.1.
(Sorry for the tone as well as for not following the template, it's late and I have an exam tomorrow -- hopefully all the information needed is here, otherwise please feel free to close!)
Anyway, thank you as always for ankidroid, it's along with anki one of the best pieces of software I'm using, I think!
Cheers to you, and if someone is around paris someday, I really have to buy y'all a drink or something!
The text was updated successfully, but these errors were encountered: