ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.44k stars 2.19k forks source link

[BUG]: During a review, after editing a card and saving the edit, going back to the review skips that card #16578

Open ripsky4501 opened 3 months ago

ripsky4501 commented 3 months ago

Checked for duplicates?

Does it also happen in the desktop version?

What are the steps to reproduce this bug?

While reviewing a deck, edit a card, and save the edit.

Expected behaviour

After saving the edit, the review should resume with the card that was being edited.

Actual behaviour

After saving the edit, the review resumes with the next card in the review sequence. In other words, the card that was being edited is skipped. If I press the "undo" button once, it undos the edit I just made. If I press the "undo" button a second time, the review goes back to the card I had edited (which is now in its original unedited state).

This bug occurs in the latest stable release on both my Android phone (Oneplus 10 Pro) and tablet (Samsung Galaxy Tab S8+). It only started happening a few weeks ago. It doesn't occur on Windows desktop Anki and the behavior there is as expected.

Debug info

AnkiDroid Version = 2.18.3 (e74513bdd21d521a7939a8b1f781123fb3ee2025)

Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)

Android Version = 14 (SDK 34)

ProductFlavor = play

Manufacturer = OnePlus

Model = NE2215

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 14; NE2215 Build/UKQ1.230924.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36

ACRA UUID = cc5f39a5-5e84-41ad-ad64-d44d419130e1

FSRS Enabled = true

Crash Reports Enabled = true

(Optional) Anything else you want to share?

No response

Research

welcome[bot] commented 3 months ago

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

jkosiaty commented 3 months ago

I wanted to report this extra annoying issue but found this report. I confirm the report

AnkiDroid Version = 2.18.3 (e74513bdd21d521a7939a8b1f781123fb3ee2025)

Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)

Android Version = 14 (SDK 34)

ProductFlavor = play

Manufacturer = samsung

Model = SM-G990B2

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 14; SM-G990B2 Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36

ACRA UUID = 4682cabf-15f3-495c-87d6-9c8baebb1a66

FSRS Enabled = true

Crash Reports Enabled = true

snowtimeglass commented 3 months ago

@ripsky4501 or @jkosiaty (or anyone else experiencing this issue), could you please check whether or not this issue is reproduced on the initial deck of a parallel build used for the first time in your device? I mean, is it reproduced even on a "fresh" (= not-yet synced, etc.) collection with default settings?

https://github.com/ankidroid/Anki-Android/releases/download/v2.18.3/AnkiDroid-2.18.3.parallel.A.apk https://github.com/ankidroid/Anki-Android/releases/download/v2.18.3/AnkiDroid-2.18.3.parallel.B.apk https://github.com/ankidroid/Anki-Android/releases/download/v2.18.3/AnkiDroid-2.18.3.parallel.C.apk

jkosiaty commented 3 months ago

Thank you for your interest "I mean, is it reproduced even on a "fresh" (= not-yet synced, etc.) collection with default settings?"

  1. Create a "test" deck
  2. Add one basic card
  3. Review the newly created deck
  4. Edit the card during review This works fine, so far. Normally we would have a bug here
  5. Mark the card "Easy", so the whole deck is reviewed for today
  6. Synchronise
  7. Custom study, "Study random selection of cards"
  8. Review
  9. Edit the card during review Actual result: The review is finished despite of the fact that the user hasn't marked the card as learned (e.g. "Easy")
snowtimeglass commented 3 months ago

Thank you for the check!

Just to make sure, were these steps done in a new collection on a parallel build with default settings?

jkosiaty commented 3 months ago

Done with the current regular build from the store.

jkosiaty commented 3 months ago

Sorry I have no access to phone on which I may install non store .apk-s

snowtimeglass commented 3 months ago

I understand. Thanks for the clarification.

  1. Edit the card during review Actual result: The review is finished despite of the fact that the user hasn't marked the card as learned (e.g. "Easy")

Is the result reproduced even after doing "Check database"?

jkosiaty commented 3 months ago
  1. Synchronize
  2. Custom study, "Study random selection of cards", press the arrow back
  3. Kebap-menu in the top right corner. Check database. "Fixed 15 invalid card properties" dialog appears.
  4. Custom study
  5. Edit note still the same
jkosiaty commented 3 months ago

"still the same" meaning the error persists. Redoing "Check database" once more doesn't help.

ripsky4501 commented 3 months ago

The issue seems to only happen for me with a custom study deck: press and hold a deck -> menu pops up -> press custom study -> press "study a random collection of cards"

ripsky4501 commented 3 months ago

The issue occurs even after I "check database."

This is on the latest regular build, as shown in the debug info I initially posted. I have not tried it on a parallel build.

jkosiaty commented 3 months ago

Yes, it seems custom study is necessary.

snowtimeglass commented 3 months ago

The issue seems to only happen for me with a custom study deck

Nice catch, I guess.

https://github.com/ankidroid/Anki-Android/assets/10436072/7d9ae997-e21d-4d16-b6e4-8832831838a8

Debug info AnkiDroid Version = 2.18.1 (5d13819ba811c6baea34dc747fce0568c755f31a) Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9) Android Version = 11 (SDK 30) ProductFlavor = full Manufacturer = OPPO Model = CPH2013 Hardware = qcom Webview User Agent = Mozilla/5.0 (Linux; Android 11; CPH2013 Build/RKQ1.200903.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36 ACRA UUID = 719dac58-aa3d-49b5-b5e6-12a35df55d00 FSRS Enabled = false Crash Reports Enabled = true
snowtimeglass commented 3 months ago

Supposedly, the flow of the skip is as follows:

https://github.com/ankidroid/Anki-Android/assets/10436072/9165bf12-282b-458c-bcab-6862027b7705

snowtimeglass commented 3 months ago

So, this issue seems to be related to (or essentially identical with):

and supposedly the issue has been fixed by:

xxhk-org commented 3 months ago

+1

I encountered the same problem, and it has been happening consistently, but it only appears in the filtered deck's editor. That is, when reviewing in the filtered deck, after editing and saving, it will automatically jump to the next card, and some modifications are not saved

AnkiDroid Version = 2.18.3 (e74513bdd21d521a7939a8b1f781123fb3ee2025)Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)Android Version = 11 (SDK 30)ProductFlavor = fullManufacturer = iReaderModel = Smart X3 ProHardware = mt6771Webview User Agent = Mozilla/5.0 (Linux; Android 11; Smart X3 Pro Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/83.0.4103.120 Safari/537.36ACRA UUID = 0e38566d-c81e-402f-b533-199f85a4a252FSRS Enabled = trueCrash Reports Enabled = true

snowtimeglass commented 3 months ago

The issue seems to only happen for me with a custom study deck: press and hold a deck -> menu pops up -> press custom study -> press "study a random collection of cards"

Reproduced in my device: on 2.19alpha4, and on 2.18.1 (whereas not reproduced on 2.17.6).

I have confirmed this issue isn't reproduced on the current HEAD, so I'd say it has already been fixed on it.

Debug info AnkiDroid Version = 2.19alpha4-debug (03dff23f9bbaca852a933c5a95dce70b257354e1) Backend Version = 0.1.39-anki24.06.2 (24.06.2 9b4dd54312de8798a3f2bee07892bb3a488d1f9b) Android Version = 11 (SDK 30) ProductFlavor = amazon Manufacturer = OPPO Model = CPH2013 Hardware = qcom Webview User Agent = Mozilla/5.0 (Linux; Android 11; CPH2013 Build/RKQ1.200903.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Mobile Safari/537.36 ACRA UUID = f74d8c3b-b173-4337-ae0c-819d3934bd5e FSRS Enabled = true Crash Reports Enabled = false
ripsky4501 commented 3 months ago

For whatever reason, the problem doesn't occur when I edit an image occlusion card.

Edit: Actually it is only when I edit just the occlusions in that card type that the problem doesn't happen. If I try to add or remove text to the header, back extra, or comments, the problem occurs.