Contribution Date
Contribution Project
Contribution Details
fix: ensure Wi-Fi is up before the browser calls the API
The browser views went straight to the API with no connectivity check,
while the older save-link path already guarded with NetworkMgr:isOnline().
KOReader turns Wi-Fi off aggressively, so on a real device the first
browse attempt failed at the socket layer and surfaced as the opaque
'Network error occurred' - with no HTTP status in the log, which sent
me hunting a TLS problem that did not exist.
Browser:navigate() now routes through NetworkMgr:beforeWifiAction() for
any view that talks to the API, re-running the navigation once the
connection is up. The static root view is exempt so opening the browser
does not prompt for Wi-Fi.
Diagnosed on a Kindle PW4: TLS was fine (TLS 1.2 negotiated, ISRG Root
X1/X2 both present in KOReader's ca-bundle), the URL was correct, and
the same endpoint worked from a laptop.
Contribution Issue Link
Files count
0
Patches count
1