ankidroid / ankidroid/Anki-Android

[BUG]: Random mistaken "Failed to load xxx.bin" toast messages when using JS API

未关闭
#16,510 20 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug Needs Author Reply Needs Triage
主要语言
Kotlin
星标
11.8k
派生
2.9k
平均合并
2 天 3 小时
30 天内合并 PR
171

描述

### 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

![WhatsApp Image 2024-05-30 at 22 18 58_9a9ce0e9](https://github.com/ankidroid/Anki-Android/assets/16080894/1a768223-7ccc-464d-a8d2-b03b7c5f2dd9)

### 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))

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。