The card doesn't exist

Recently, after switching back to the app, when I tap on a card to show the answer, Anki has started showing an error like “the card doesn’t exist”. (My phone is in Japanese, so the actual error is “カードががありません”.) I can work around the error by restarting the app or shaking my phone to undo, but when I do this, I sometimes lose a few cards of progress. I’ve tried restarting the app, checking the database, and restarting my phone.

Let me know if you need any more information to debug this issue.

I found カードがありません。 in the translation database – does that seem right? [actions-no-current-card / mobile/templates/actions.ftl] In English that string is “No current card” – but I’m not sure that clears much up. :sweat_smile:

I want to make sure I understand. Can you clarify what you mean by switching back?

1 Like

Sure! This happens when I close (but not quit) the app (by swiping up from the bottom) and then reopen it later.

When you close the app, are you in the midst of an active study session, or at a “netutral” screen, like the deck list or card browser?

I’m in a study session. I’m looking at the same card before I close the app and after I reopen it

Okay! What’s up with these cards? Do they have lots of scripts and images and sound and formatting, or pretty plain-jane vanilla text?

The cards have plain text in the title and basic HTML in the body:

It doesn’t seem like this could be caused by the card templates then. Does this happen for just one note type or several/all note types?

Are any of these type-your-answer notes/cards – especially ones that rely on an add-on on Anki Desktop?

The only other suggestions I see have to do with switching to the v3 scheduler, but since the v2 scheduler is no longer supported (I assume that happened in AnkiMobile along with the other apps), as long as you’re using the current version of AnkiMobile, you’ve already done that.

The obvious work-around for now is to exit your study session, to the deck/menu screen, before leaving the app. We’ll see if @dae has anything else he’d like to know.

1 Like

Does this happen for just one note type or several/all note types?

I only have one type of note in my deck, so I’m not sure.

Are any of these type-your-answer notes/cards – especially ones that rely on an add-on on Anki Desktop?

No, they are default reveal-answer cards.

as long as you’re using the current version of AnkiMobile

I’m on 24.07.

1 Like

There are 2 places that will be shown:

  • the record/replay voice menu, which I presume you’re not using?
  • when an action that requires a current card is triggered via tap, swipe, top bar, etc

It sounds like it may be the latter, but I wonder when and what action is being triggered here? Do you use the auto-advance feature?

1 Like

I’ve only observed this when I tap on a card to reveal the answer. I don’t use auto advance or voice recording/replay. I’ll try to figure out how to reproduce it.

1 Like

Ah, sorry, I missed above that you were tapping before the error occurred. What happens if you return to the deck list and then go back into the deck - does the error still occur? Is a day passing before switching back to the app, or does this error start happening even when you used the app earlier the same day as well?

2 Likes

I figured out how to reproduce the error:

  1. Open a deck to reveal a card.
  2. Background the app.
  3. Add a new card to the deck using the URL below.
  4. Open Anki.
  5. Tap on the shown card.

anki://x-callback-url/addnote?profile=User 1&type=Basic&deck=Vocabulary&dupes=1&fldFront=Definition&fldBack=Back

I’m doing this using a Shortcut, but I’m guessing that any method of opening an Anki link would work.

To answer your questions, if I return to the deck list and reopen the deck, the error stops happening. The error can happen at any time during the day, even after I’ve answered some cards.

1 Like

Thanks, that’s very helpful. I’ve made a note to address this in the next update (the previous one is currently rolling out)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.