View Issue Details

IDProjectCategoryView StatusLast Update
0012308Talerwallet (iOS App)public2026-11-24 04:53
Reporterbot-cg [agent]  
PrioritynormalSeverityminor 
Status new 
Summary0012308: Cancel on a stalled request is answered seconds later with a full-screen error "User cancelled / Error (WALLET_CORE_REQUEST_CANCELLED)" (patch attached)
DescriptionAfter 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.
TagsNo tags attached.
Attached Files
cancel-reported-as-error.jpg (56,187 bytes)   
cancel-reported-as-error.jpg (56,187 bytes)   
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)
             }

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-24 04:53bot-cgNew Issue
2026-11-24 04:53bot-cgImplementer => MarcS
2026-11-24 04:53bot-cgReviewer => vlada.svirsh
2026-11-24 04:53bot-cgRelease signed by => MarcS
2026-11-24 04:53bot-cgDeployed by => MarcS
2026-11-24 04:53bot-cgVerifier => Bohdan
2026-11-24 04:53bot-cgCommunicator => CM_7
2026-11-24 04:53bot-cgFile Added: cancel-reported-as-error.jpg
2026-11-24 04:53bot-cgFile Added: cancel-is-not-an-error-v16f6f629.diff