ankidroid / Anki-Android

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

[Bug] Closet addon nonfunctional in Android versions 9 and below #9311

Closed talenelat-elin closed 3 years ago

talenelat-elin commented 3 years ago

Preface: I'm unsure of the complete extent or cause of the problem

This concerns the the addon Closet. Cards created using it are supposed to work in AnkiDroid from version 2.15 too, but I'm seeing that it doesn't work in certain devices.

The problem: The clozes and occlusions are not rendered at all, instead the contents of the fields are shown, including the closet notation, like so: image In a functioning card, the contents of the double square brackets should have been replaced by [...] in the front of the card.

How I test it:

  1. Delete all the ankidroid files present from previous installs, if any.
  2. Fresh install of ankidroid from the play store
  3. Import an apkg file of closet cards that I've created (that definitely work on Anki Windows)- LINK
  4. Check the cards

So far, I've tested 6 devices:

  1. Xiaomi Redmi Note 5 Pro - broken
  2. Xiaomi Redmi Y2 - broken
  3. Xiaomi Redmi Note 7 Pro - broken
  4. Lenovo K9 - Broken
  5. OnePlus 6 - Works
  6. RealMe 2 - Works

I'd appreciate it if people could import the deck and check out the cards on their devices and add to the data.

I've posted an issue in Closet's github too

Tested in: AnkiDroid 2.15.6

welcome[bot] commented 3 years 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

talenelat-elin commented 3 years ago

It's possibly due to Android version differences, I'll update here as soon as I get the information of these devices.

david-allison commented 3 years ago

Does it work (without the addon) on the latest version of Anki Desktop?

talenelat-elin commented 3 years ago

Does it work (without the addon) on the latest version of Anki Desktop?

@david-allison-1, Yes. Just tested in Anki Windows 2.1.44 (64bit) and all cards work.

I'm not sure if you're familiar with closet, but the cards once made should function in all anki versions beyond 2.1.41, without requiring any addons, because the reviewer side of closet works via a javascript file that is included inside the template. (__closet-0.5.3.js)

The actual addon helps in creation of the closet cards.

talenelat-elin commented 3 years ago

I think it is related to Android versions.

Evidence:

Phonestatus
Android Version
Xiaomi Redmi Note 5 Probroken
9 PKQ1.180904.001
Xiaomi Redmi Y2broken9 PKQ1.181203.001
Lenovo K9broken8.1.0
Xiaomi Poco M2
working10 QP1A.190711.020
OnePlus 6working10 (OxygenOS v10.3.11)
Realme 2 Proworking
10 (Realme UI V1.0)
hgiesel commented 3 years ago

Closet relies on dynamic imports, which was added in https://github.com/ankidroid/Anki-Android/pull/7764. It seems like this only works on Android 10+, so there's really nothing we can do.