User Details
User Details
- User Since
- Oct 12 2026, 9:23 AM (5 w, 11 h)
- Availability
- Available
- LDAP User
- Unknown
- MediaWiki User
- HuangShuEn [ Global Accounts ]
Fri, Oct 23
Fri, Oct 23
HuangShuEn added a comment to T441996: App crashes with IllegalArgumentException when a response contains a non-ASCII `xkey` header.
Thanks for the questions. Here are the details:
What I was doing
The crash happened during automated UI testing (a monkey/property-based testing tool driving the app), not manual use. Right before the crash:
- From an article page, the test opened search and entered "Hongwu era" (English Wikipedia, app language EN).
- About 0.6 s later the app crashed on an OkHttp Dispatcher thread.
App flavor / version
Production flavor: package org.wikipedia, versionName r/50611-r-2026-10-07, versionCode 50611.
Not installed from the Play Store: it was sideloaded with adb from F-Droid.
Device
Android Emulator (sdk_gphone_x86_64, Google APIs image, x86_64), Android 11 (API 30).
Analysis (may help)
- In the release build, the throwing frame (CacheInterceptor.intercept, line 636 in the R8-mapped trace) is OfflineCacheInterceptor's fallback path. When a network request fails with an IOException, it rebuilds the response from the saved offline header file (files/offline_files/<hash>.0) and calls Response.Builder.header(name, value) for each stored line. header() rejects non-ASCII values, and the exception is not caught.
- Thumbnails served by Thumbor (thumb.wikimedia.org, server: Thumbor/7.8.0) include an xkey header containing the Commons file name, e.g. xkey: File:孝慈高皇后_(1).jpg. I found such a response in the app's okhttp cache on the device. Thumbnails already in storage (server: envoy) don't include it. So whether a saved article gets a non-ASCII xkey stored depends on server-side timing, which explains why the crash is hard to reproduce.
- When the article was saved for offline reading, the xkey value was stored as-is. When a later request for that URL failed (here most likely cancelled when the search screen was closed), the offline fallback read it back and crashed.
Thu, Oct 22
Thu, Oct 22
Oct 13 2026
Oct 13 2026
Oct 12 2026
Oct 12 2026
HuangShuEn edited projects for T440851: Wikipedia Alpha crashes on Android emulator with "No Vulkan compatible GPU found", added: WikipediaApp, Wikipedia-Android-App; removed MediaWiki-General.
