Skip to content
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

Changes to Ankidroid "Start of next day" hour settings can force full sync when interacting with Anki desktop #3488

Closed
hssm opened this issue Jul 28, 2015 · 6 comments

Comments

@hssm
Copy link
Member

hssm commented Jul 28, 2015

Originally reported on Google Code with ID 2592

What steps will reproduce the problem?
1. Ensure AnkiDroid and desktop are both in sync with ankiweb and that "start of next
day" hasn't yet occurred for the day.
2. Change "Start of next day" from a point in the future (i.e. later than now) to a
time in the past (i.e. earlier in the day than now)
3. Synchronize AnkiDroid as normal (observe: only ~3 KB uploaded, normal "Collection
Synchronized" message)
4. Attempt to synchronize Anki desktop, receive error "Your collection is in an inconsistent
state. Please run Tools>Check Database, then sync again"
5. Tools>Check database ("Database rebuilt and optimized", normal message)
6. Attempt to synchronize Anki desktop again, receive sync collision message (ie. full
sync forced)


What is the expected output? What do you see instead?
Normal synchronization with no message about inconsistent collection state.

Does it happen again every time you repeat the steps above? Or did it
happen only one time?
Reproducible each time.

Paste the "debug info" from the AnkiDroid "About" dialog below (see the
above help webpage for detailed instructions).

AnkiDroid Version = 2.4.3
Android Version = 4.4.4
ACRA UUID = a8ca1a54-cb54-4800-862f-5b2954b35909

Please provide any additional information below.

1) Just to clarify the sequence, let's say that the "new day begins" is set to 20 hours
past midnight, it's currently 2 PM in your present locale, and the updated setting
is being set to 10.

2) Setting the start of next day from a point in the future to a point further in the
future (e.g. changing from 20 to 21 when it's currently 2 PM) does not seem to cause
any sync issues. 

3) Using Anki Desktop Version 2.0.32, MacOS 10.9.5 (current version of Anki desktop
as of this post)

Reported by [email protected] on 2015-04-26 20:15:54

@hssm
Copy link
Member Author

hssm commented Jul 28, 2015

Reported by nicolas.raoul on 2015-06-01 07:44:44

  • Labels added: Priority-Medium
  • Labels removed: Priority-Undecided

@timrae timrae removed the New label Jul 28, 2015
@flimzy
Copy link

flimzy commented Oct 7, 2015

My observation, which may be related, but not identical, is that setting the "start of day" in AnkiDroid has no effect on the desktop version, and the next time I sync my phone, AnkiDroid "forgets" the new start-of-day value, and reverts to the previous value.

@dima4p
Copy link

dima4p commented Jul 19, 2018

I will describe the problem a little different way. AnkiDroid does not accept the start of the day saved on the server and overwrites the value with the own setting.
So AnkiDroid MUST after the data from the server is downloaded, first check which value for "start of the day" is more recent: from the server or local and the accordingly change local value or remote. Now it always changes the remote one.
If the date of the remote value for the setting is not available, AnkiDroid MUST always change the local value.
And only after that recalculate the words to work today!

@mikehardy
Copy link
Member

@dima4p nailed it here - this is a general problem with anything stored in the JSON blob in the deck conf. That's something that is synchronized every single time, so I suppose after synchronizing (even if there were maybe no other changes) AnkiDroid needs to always re-initialize any values that came out of the deck conf

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2020

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

@github-actions github-actions bot added the Stale label Jun 3, 2020
@dima4p
Copy link

dima4p commented Jun 3, 2020

just waiting for the solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants