[BUG]: globalThis.AnkiDroidJS is undefined
Checked for duplicates?
- [X] This issue is not a duplicate
Does it also happen in the desktop version?
- [X] This bug does not occur in the latest version of Anki
What are the steps to reproduce this bug?
Accessing the AnkiDroidJS object through globalThis no longer works, apparently after https://github.com/ankidroid/Anki-Android/pull/14564.
Expected behaviour
globalThis.AnkiDroidJS should be equivalent to AnkiDroidJS.
Actual behaviour
globalThis.AnkiDroidJS and window.AnkiDroidJS are undefined, while AnkiDroidJS works as expected.
Debug info
AnkiDroid Version = 2.18beta2-debug (bc58dceaad164f3cfeb9a16729dcb890f5ab5fa2)
Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)
Android Version = 14 (SDK 34)
ProductFlavor = amazon
Manufacturer = Google
Model = sdk_gphone64_x86_64
Hardware = ranchu
Webview User Agent = Mozilla/5.0 (Linux; Android 14; sdk_gphone64_x86_64 Build/UE1A.230829.030; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/113.0.5672.136 Mobile Safari/537.36
ACRA UUID = 700f99a6-74f2-4112-927f-578cd2cdb1ee
FSRS Enabled = false
Crash Reports Enabled = false
(Optional) Anything else you want to share?
This behavior is unintuitive and is breaking some functionality in popular note types, e.g. https://forums.ankiweb.net/t/anki-as-a-knowledge-base-with-a-massive-cloze-note/11658/92
Research
- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the manual and the FAQ and could not find a solution to my issue
- [X] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
@BrayanDSO FYI
This has been around since at least alpha15 and I can't think of anything specific that I have done that could result in that.
I can't find the documentation specifying that this should be intended or not. @krmanik has any thoughts?
Hello 👋, this issue has been opened for more than 3 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