WebxdcStoreActivity (src/main/java/org/thoughtcrime/securesms/WebxdcStoreActivity.java) loads a remote store URL via webView.loadUrl(Prefs.getWebxdcStoreUrl(this)). The current WebViewClient overrides shouldOverrideUrlLoading and shouldInterceptRequest, but not onReceivedError.
interceptRequest already catches RPC failures and synthesises a plain-text "Could not load apps. Are you online?" response, which covers the common offline case nicely. But that only kicks in once shouldInterceptRequest is actually invoked. WebView-layer failures that prevent shouldInterceptRequest from running (URL resolution errors, premature transport reset on the very first main-frame request, renderer crashes) end up silent in adb logcat, which makes triage of store load issues harder than it has to be.
Suggested fix: add onReceivedError(view, request, error) on the same anonymous WebViewClient (API 23+), guard with request.isForMainFrame() so transient sub-resource errors do not spam the log, and log the error code and description via the existing Log helper and TAG. PR for this at #154.
WebxdcStoreActivity(src/main/java/org/thoughtcrime/securesms/WebxdcStoreActivity.java) loads a remote store URL viawebView.loadUrl(Prefs.getWebxdcStoreUrl(this)). The currentWebViewClientoverridesshouldOverrideUrlLoadingandshouldInterceptRequest, but notonReceivedError.interceptRequestalready catches RPC failures and synthesises a plain-text "Could not load apps. Are you online?" response, which covers the common offline case nicely. But that only kicks in onceshouldInterceptRequestis actually invoked. WebView-layer failures that preventshouldInterceptRequestfrom running (URL resolution errors, premature transport reset on the very first main-frame request, renderer crashes) end up silent in adb logcat, which makes triage of store load issues harder than it has to be.Suggested fix: add
onReceivedError(view, request, error)on the same anonymousWebViewClient(API 23+), guard withrequest.isForMainFrame()so transient sub-resource errors do not spam the log, and log the error code and description via the existingLoghelper andTAG. PR for this at #154.