ankidroid / ankidroid/Anki-Android
[BUG]: Random mistaken "Failed to load xxx.bin" toast messages when using JS API
- Langage dominant
- Kotlin
- Étoiles
- 11.8k
- Forks
- 2.9k
- Merge moyen
- 2 j 3 h
- PR mergées (30 j)
- 171
Description
### 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?
Use the JS API a lot. It only happens randomly. Maybe it is possible to reproduce it reliably by calling some harmless API method in a loop.
### Expected behaviour
No error message should be displayed.
### Actual behaviour
Sometimes (no discernible pattern) AnkiDroid will throw a "Card Content Error: Failed to load 'xxx.bin'" warning, despite everything working fine. xxx being a name referring to an element of the JS API, e.g . "cardDue.bin", "cardMod.bin", "ttsSetLanguage". Maybe all strings from the jsApiList in AnkiDroid/src/main/assets/scripts/js-api.js are possible.
### Debug info
```text
AnkiDroid Version = 2.18.0 (464cf290cc77c3f2c562cb03b408b78a13be261b)
Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)
Android Version = 13 (SDK 33)
ProductFlavor = full
Manufacturer = Google
Model = Pixel 4a
Hardware = sunfish
Webview User Agent = Mozilla/5.0 (Linux; Android 13; Pixel 4a Build/TQ3A.230805.001.S1; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/124.0.6367.179 Mobile Safari/537.36
ACRA UUID = 4d6cad38-e805-4913-82fe-99652a272d86
FSRS Enabled = true
Crash Reports Enabled = true
```
### (Optional) Anything else you want to share?
I am pretty sure this began with JS-API 0.2 or 0.3.
This is the string: Card Content Error: Failed to load ‘%s’
This issue is related: https://github.com/ankidroid/Anki-Android/issues/10033

### Research
- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [X] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://docs.ankidroid.org/manual.html#betaTesting))
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.