View Issue Details

IDProjectCategoryView StatusLast Update
0010254Talerwallet-corepublic2026-08-12 23:16
ReporterMarcS Assigned ToMarcS Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeveritymajorReproducibilityalways
Status informingResolutionfixed 
Product Version1.0 
Target Version1.6Fixed in Version1.6 
Summary0010254: Wallet-core doesn't wake up correctly from background
DescriptionWhen the user switches to another app, Taler Wallet is sent to the background (if the user doesn't kill it).
When later the user taps on a talerURI e.g. in Mail.app, Taler Wallet is brought to the foreground again with an "openURL" call. The wallet then passes the talerURI to wallet-core - which does nothing, so the app hangs, spinning the Taler Logo forever...

❗️.onChange() ==> Background)
❗️App Will Enter Foreground
[M] 19:40:45.303 � Controller.swift:325 Controller#1 openURL(_:stack:) taler://pay/backend.chf.taler.net/instances/snack/2025.228-00RDM1DH37PR4/?c=GKMBDTDJGDAH0G03FQZ2M4N6RC
�"id":34 preparePayForUri{"talerPayUri":"taler:\/\/pay\/backend.chf.taler.net\/instances\/snack\/2025.228-00RDM1DH37PR4\/?c=GKMBDTDJGDAH0G03FQZ2M4N6RC"}
❗️.onChange() ==> Active
❗️App Did Become Active

Wallet-core should now examine the talerURI and query the server (in this case backend.chf.taler.net) for the payment data, but it does NOT start a network call.

Workaround: Kill the app, tap on the talerURI in Mail again - this time wallet-core sends a notification (transaction-state-transition) and makes a network call:

❗️.onChange() ==> Background)
❗️App Will Enter Foreground
[M] 19:50:40.198 � Controller.swift:325 Controller#1 openURL(_:stack:) taler://pay/backend.chf.taler.net/instances/snack/2025.228-00RDM1DH37PR4/?c=GKMBDTDJGDAH0G03FQZ2M4N6RC
�"id":20 preparePayForUri{"talerPayUri":"taler:\/\/pay\/backend.chf.taler.net\/instances\/snack\/2025.228-00RDM1DH37PR4\/?c=GKMBDTDJGDAH0G03FQZ2M4N6RC"}
pay-merchant.ts created new proposal for 2025.228-00RDM1DH37PR4 at https://backend.chf.taler.net/instances/snack/ session
pay-merchant.ts waiting for txn:payment:1HVA74PRCSTCFRJKJETAVGHJMKVTJC3A3PR4F7XBP8ZV7PKGHHMG to be downloaded
[9] 19:50:40.237 � WalletCore.swift:323 WalletCore#1 handleNotification(_:_:) {"type":"notification","payload":{"type":"transaction-state-transition","oldTxState":{"major":"none"},"newTxState":{"major":"pending","minor":"claim-proposal"},"transactionId":"txn:payment:1HVA74PRCSTCFRJKJETAVGHJMKVTJC3A3PR4F7XBP8ZV7PKGHHMG"}}
Pending:claim-proposal txn:payment:1HVA74PRCSTCFRJKJETAVGHJMKVTJC3A3PR4F7XBP8ZV7PKGHHMG
❓27 POST https://backend.chf.taler.net/instances/snack/orders/2025.228-00RDM1DH37PR4/claim
❗️ 27 https://backend.chf.taler.net/instances/snack/orders/2025.228-00RDM1DH37PR4/claim
Steps To Reproduce• Launch Taler Wallet, do something, then send it to the background.
• Wait some time (I don't know how long, but after 1 hour the following should happen)
• tap on a talerURI in a mail, or in the browser (e.g. the DEMO store)
Taler Wallet comes to the front, and should process the talerURI. But it just spins the Logo...
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

The plan

IDSummaryStatusAssigned ToEstimated effort (hours)
0011668wallet-core does not nicely recover from DB errors informingFlorian Dold
This issue (hours)
Its children (hours)0
Together (hours)0
Nothing is missing: the plan can be finished.

Relationships

parent of 0011668 informingFlorian Dold wallet-core does not nicely recover from DB errors 

Activities

Florian Dold

2025-08-18 13:06

manager   ~0025652

I need some more info to reproduce this.

* Does wallet-core not answer *any* requests? Or just preparePayForUri?
* Is the URI in preparePayForUri a new URI or did you call preparePayForUri on it before?

MarcS

2025-09-30 09:01

developer   ~0026065

This is difficult to reproduce.
Sent you a new log file.
We need more log output from wallet-core to see what's going on...

MarcS

2026-06-17 13:22

developer   ~0028930

Usually this doesn't happen while the iPhone is connected to the Debugger, but only when I just carry it around and hours later re-open Taler Wallet (which wasn't killed, but suspended in the background). I scan a QR code and - the rotating Taler logo spins forever.
Next indicator: I wake up the phone, try to send p2p, but amountAvailable is 0.
In both cases, I kill the app, launch again and everything works.

I only had this happen twice in the morning when the iPhone was still running with the Debugger from the evening before. And then I clearly saw that wallet-core DID answer standard calls such as getBalances, but when I scanned something (QR with talerURI) wallet-core did NOT make a network call. Maybe it was still distracted because when it got suspended outstanding longpolls got lost.

MarcS

2026-06-17 13:35

developer   ~0028932

From logfile entries we found out, that wallet-core can no longer make DB calls when it's in the background.

Suggestion: I get signaled from iOS each time the app goes to the background and/or comes to the foreground again. I can easily forward these signals to wallet-core - which could then try to "wake up" itself and retry the failed DB calls, and start longpolling again.

If this is not sufficient, wallet-core needs a "soft reset" call. After 20 or 30 seconds waiting, the iOS Wallet could show the user an alert and offer to "Reset wallet-core".
If that is too much hassle to implement in wallet-core, I could terminate the process myself and restart it.

But let's try first the signals...

Florian Dold

2026-08-09 21:11

manager   ~0029435

As discussed, hintApplicationResumed now reports DB health via the following response:

export interface HintApplicationResumedResponse {
  dbWriteHealthy: boolean;
  dbReadHealthy: boolean;
}


commit 7d327bd9df668b1b4148695cb53a73151958b8f3 (HEAD -> master, origin/master, origin/HEAD)
Author: Florian Dold <dold@taler.net>
Date: Sun Aug 9 23:09:12 2026 +0200

    wallet-core: report database health on resume

MarcS

2026-08-11 09:39

developer   ~0029457

1.6.7(1.6.19) now shows an error if wallet-core cannot read/write the DB after coming back from background.
Let's see how often that happens IRL, if at all. I experienced it with a DEBUG version, which might behave differently than an AppStore version.

If people start complaining, we can then try to re-initialize wallet-core, and if that still doesn't help tell the user we must kill the app. But my guess is that this doesn't happen with AppStore versions.

Issue History

Date ModifiedUsernameFieldChange
2025-08-16 17:58MarcSNew Issue
2025-08-16 21:35Christian GrothoffAssigned To => Florian Dold
2025-08-16 21:35Christian GrothoffStatusnew => assigned
2025-08-16 21:35Christian GrothoffProduct Version => 1.0
2025-08-16 21:35Christian GrothoffTarget Version => 1.0 stretch goals
2025-08-18 13:05Florian DoldAssigned ToFlorian Dold => MarcS
2025-08-18 13:06Florian DoldNote Added: 0025652
2025-08-19 13:13Christian GrothoffTarget Version1.0 stretch goals => 1.1
2025-09-30 09:01MarcSNote Added: 0026065
2025-10-08 19:11Christian GrothoffTarget Version1.1 => 1.5
2026-03-17 11:00Christian GrothoffTarget Version1.5 => 1.6
2026-06-17 13:22MarcSStatusassigned => acknowledged
2026-06-17 13:22MarcSNote Added: 0028930
2026-06-17 13:35MarcSAssigned ToMarcS => Florian Dold
2026-06-17 13:35MarcSStatusacknowledged => feedback
2026-06-17 13:35MarcSNote Added: 0028932
2026-07-24 13:56Florian DoldTarget Version1.6 => 1.7
2026-07-24 13:56Florian DoldStatusfeedback => implementing
2026-07-24 13:56Florian DoldRelationship addedparent of 0011668
2026-08-09 21:11Florian DoldNote Added: 0029435
2026-08-09 21:11Florian DoldAssigned ToFlorian Dold => MarcS
2026-08-09 22:43Christian GrothoffTarget Version1.7 => 1.8
2026-08-11 09:39MarcSStatusimplementing => informing
2026-08-11 09:39MarcSResolutionopen => fixed
2026-08-11 09:39MarcSFixed in Version => 1.6
2026-08-11 09:39MarcSNote Added: 0029457
2026-08-12 23:16Christian GrothoffTarget Version1.8 => 1.6