View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012308 | Taler | wallet (iOS App) | public | 2026-11-24 04:53 | 2026-11-24 04:53 |
| Reporter | bot-cg [agent] | ||||
| Priority | normal | Severity | minor | ||
| Status | new | ||||
| Summary | 0012308: Cancel on a stalled request is answered seconds later with a full-screen error "User cancelled / Error (WALLET_CORE_REQUEST_CANCELLED)" (patch attached) | ||||
| Description | After the user presses Cancel on a stalled request, the app answers a few seconds later with a full-screen error: "User cancelled / Error (WALLET_CORE_REQUEST_CANCELLED)" and an OK button. It replaces whatever screen the user is on by then. See cancel-reported-as-error.jpg. Observed (master 16f6f629, GNU_Taler, iPhone 17 simulator, iOS 27.2, 2026-11-24) ---------------------------------------------------------------------- A funded wallet with the network cut off (wallet-core's test hook that drops every request), then a taler://pay-template link: 05:26:09.514 checkPayForTemplate (with a progress token) "Loading..." -> "Couldn't establish a connection / Request timed out after 5000 ms / Retry now / Cancel" 05:26:22.378 the user taps Cancel -> cancelProgressToken; the sheet closes, Balances is shown 05:26:27.025 Request "id":55 failed after 17513 ms, error: 7036 -> the error view covers Balances Three runs without the patch, all three end on the error view (twice 4.6 s after the tap). In one of them the user had already opened a transaction when it arrived, so the error appeared over that transaction's page. Cause ----- WalletModel.sendRequest shows every error a request throws unless the calling view said it handles errors itself (WalletModel.swift:202-209). The answer to cancelProgressToken is the cancelled request failing with 7036, so the user's own Cancel is reported back to them. ErrorView.swift:156-158 gives that code the title "User cancelled"; WalletCore.swift:686 carries "// TODO: WALLET_CORE_REQUEST_CANCELLED" at the place where the error is recorded. Patch ----- cancel-is-not-an-error-v16f6f629.diff, against master 16f6f629 (one file, +7 -1): sendRequest still throws 7036 to its caller, but does not put it on screen. Built, and the same steps run on it once: Cancel at 05:50:52.557, 7036 at 05:50:52.785, and twelve seconds later Balances is still shown and there is no error view. The same check on the unpatched build fails on the error view. The test build also carried my patches for 0012299, 0012297, 0012153 and 0012306 and the 7058 title of 0011934; none of them touches WalletModel.swift. Not established: the other requests that can be cancelled the same way (a withdrawal link, a P2P link) -- they go through the same sendRequest, but I ran only the pay-template case. Simulator only. Related: 0011935 (the stalled view itself), 0011983 (a wait with no deadline and an Abort that cancels nothing). Estimated severity: minor. Filed by an agent (bot-cg) on behalf of Christian Grothoff, from an automated UI exploration campaign. | ||||
| Tags | No tags attached. | ||||
| Attached Files | cancel-is-not-an-error-v16f6f629.diff (1,110 bytes)
diff --git a/TalerWallet1/Model/WalletModel.swift b/TalerWallet1/Model/WalletModel.swift
index 3a83b865..e20342be 100755
--- a/TalerWallet1/Model/WalletModel.swift
+++ b/TalerWallet1/Model/WalletModel.swift
@@ -202,7 +202,13 @@ final class WalletModel: ObservableObject, Sendable {
} catch { // rethrows
let timeUsed = Date.now - sendTime
logger.error("\(request.operation, privacy: .public) failed after \(timeUsed.milliseconds, privacy: .public) ms\n\(error, privacy: .public)")
- if !viewHandles {
+ // WALLET_CORE_REQUEST_CANCELLED is the answer to cancelProgressToken, i.e. to the user
+ // pressing Cancel on a stalled request. It arrives seconds later and is no news to them.
+ var cancelledByUser = false
+ if case WalletBackendError.walletCoreError(let detail) = error, detail?.code == 7036 {
+ cancelledByUser = true
+ }
+ if !viewHandles && !cancelledByUser {
// TODO: symlog + controller sound
await setError(error)
}
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-24 04:53 | bot-cg | New Issue | |
| 2026-11-24 04:53 | bot-cg | Implementer | => MarcS |
| 2026-11-24 04:53 | bot-cg | Reviewer | => vlada.svirsh |
| 2026-11-24 04:53 | bot-cg | Release signed by | => MarcS |
| 2026-11-24 04:53 | bot-cg | Deployed by | => MarcS |
| 2026-11-24 04:53 | bot-cg | Verifier | => Bohdan |
| 2026-11-24 04:53 | bot-cg | Communicator | => CM_7 |
| 2026-11-24 04:53 | bot-cg | File Added: cancel-reported-as-error.jpg | |
| 2026-11-24 04:53 | bot-cg | File Added: cancel-is-not-an-error-v16f6f629.diff |