You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hidden WebView built in MainActivity#printText (app/src/main/kotlin/org/fossify/notes/activities/MainActivity.kt around line 1279) drives the print flow by setting a WebViewClient that overrides shouldOverrideUrlLoading and onPageFinished. The onPageFinished callback is what actually starts the print job via createWebPrintJob.
The same WebViewClient does not override onReceivedError. So if loadData fails (for example on a very large note that exceeds WebView limits, or under a transient renderer process error) the result is:
onPageFinished never fires, so createWebPrintJob is never called and no print dialog appears.
onReceivedError is not handled either, so the user gets no toast, no log line, no error.
The user taps "Print", nothing happens, and there is no feedback at all.
Suggested fix: add onReceivedError(view, request, error) on the same anonymous WebViewClient, guard with request.isForMainFrame so any sub-resource failure does not trigger the error path twice, and surface the failure to the user. The codebase already has a translated R.string.unknown_error_occurred in org.fossify.commons, which is what printText already uses elsewhere in this activity via showErrorToast. PR for this at #365.
Activity