ankidroid / ankidroid/Anki-Android

[BUG]: Restricting cleartext network traffic breaks import and statistics pages

Đang mở
#15,991 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Bug Help Wanted Keep Open Priority-Medium
Ngôn ngữ chính
Kotlin
Star
11.8k
Fork
2.9k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
171

Mô tả

### Checked for duplicates?

- [X] This issue is not a duplicate

### Does it also happen in the desktop version?

- [ ] This bug does not occur in the latest version of Anki

### What are the steps to reproduce this bug?

Restrict cleartext network traffic globally on your device (which blocks all non-TLS traffic). Open Ankidroid and try importing a deck from a local file or visit statistics page.

### Expected behaviour

The import page (after choosing a local deck package file) and statistics page should be accessible

### Actual behaviour

A blank page with "TypeError: failed to fetch" message is shown instead of import page and statistics page.

### Debug info

```text
AnkiDroid Version = 2.17.6 (568538896be943818ca793dd2635822265712def)

Backend Version = 0.1.34-anki23.12.1 (23.12.1 1a1d4d5419c6b57ef3baf99c9d2d9cf85d36ae0a)

Android Version = 14 (SDK 34)

ProductFlavor = full

Manufacturer = Fairphone

Model = FP5

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 14; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.90 Mobile Safari/537.36

ACRA UUID = 7a8bdf5f-c6c6-4679-b2fd-0ae240e97685

Crash Reports Enabled = true
```

### (Optional) Anything else you want to share?

_No response_

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.