View Issue Details

IDProjectCategoryView StatusLast Update
0010254Talerwallet-corepublic2026-06-17 15:37
ReporterMarcS Assigned ToFlorian Dold  
PriorityhighSeveritymajorReproducibilityalways
Status feedbackResolutionopen 
Product Version1.0 
Target 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.

Activities

Florian Dold

2025-08-18 15: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 11: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 15: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 15: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...

Issue History

Date Modified Username Field Change
2025-08-16 19:58 MarcS New Issue
2025-08-16 23:35 Christian Grothoff Assigned To => Florian Dold
2025-08-16 23:35 Christian Grothoff Status new => assigned
2025-08-16 23:35 Christian Grothoff Product Version => 1.0
2025-08-16 23:35 Christian Grothoff Target Version => 1.0 stretch goals
2025-08-18 15:05 Florian Dold Assigned To Florian Dold => MarcS
2025-08-18 15:06 Florian Dold Note Added: 0025652
2025-08-19 15:13 Christian Grothoff Target Version 1.0 stretch goals => 1.1
2025-09-30 11:01 MarcS Note Added: 0026065
2025-10-08 21:11 Christian Grothoff Target Version 1.1 => 1.5
2026-03-17 12:00 Christian Grothoff Target Version 1.5 => 1.6
2026-06-17 15:22 MarcS Status assigned => acknowledged
2026-06-17 15:22 MarcS Note Added: 0028930
2026-06-17 15:35 MarcS Assigned To MarcS => Florian Dold
2026-06-17 15:35 MarcS Status acknowledged => feedback
2026-06-17 15:35 MarcS Note Added: 0028932