Repository navigation
Unreachable LSP at startup skips the opening deep link and later startup steps #4779
Description
Describe the bug
When the LSP host cannot be reached at startup, the rest of wallet startup is skipped. A lightning: link that opened the app is ignored, and every return to the wallet screen runs the whole startup again.
fetchDataCore awaits LSPStore.getLSPInfo() with no try/catch:
Lines 1383 to 1395 in 5792769
| if (BackendUtils.supportsFlowLSP()) { | |
| if ( | |
| SettingsStore.settings.enableLSP && | |
| (implementation !== 'lnd' || | |
| !this.props.NodeInfoStore.flowLspNotConfigured) | |
| ) { | |
| await LSPStore.getLSPInfo(); | |
| } | |
| if (BackendUtils.supportsLSPScustomMessage()) { | |
| LSPStore.subscribeCustomMessages(); | |
| } | |
| LSPStore.initChannelAcceptor(); | |
| } |
getLSPInfo rejects on a network error, on a reply that is not JSON, and on any status other than 200, including the geoblock reply. fetchData has no catch and getSettingsAndNavigate swallows the error, so nothing after that line runs:
- LinkingUtils.handleInitialUrl, so the link that opened the app is dropped
- initialLoad: false, so handleFocus calls getSettingsAndNavigate again on every focus
- LinkingUtils.processPendingDeepLink, so a link held back by the lock screen is dropped
- the Nostr Wallet Connect service init on the first connect, and processPendingGraphSyncPayment
This affects LDK Node and embedded LND with the LSP on, which is the default. I reproduced it with LDK Node.
A second problem in the same block, found by reading only and not reproduced: line 1387 checks !this.props.NodeInfoStore.flowLspNotConfigured. That is a method, not a value, so for lnd the check is always false and getLSPInfo never runs at startup. Every other caller uses NodeInfoStore.flowLspNotConfigured() and reads flowLspNotConfigured from the result. Fixing only this one would bring the first problem to LND users too, so the two belong together.
I can send a small PR for both: a try/catch around the call, like the NWC init right below it, and the flowLspNotConfigured() call.
Reproduce
- Use an LDK Node wallet on mainnet.
- Settings > Lightning Service Provider (LSP) > Just-in-time channels: set the LSP to http://127.0.0.1:9 (a closed port).
- Close the app and open a lightning: link to an invoice. I used: adb shell am start -a android.intent.action.VIEW -d "lightning:" app.zeusln.zeus
- Wait for the node to connect. The wallet screen opens, and the payment method screen does not.
- Leave the wallet screen and come back. Each time the log shows: [Wallet] handleFocus: triggering getSettingsAndNavigate (initialLoad=true, posWasEnabled=false, triggerSettingsRefresh=false, connecting=false)
Control: press Reset on the same screen (the LSP goes back to https://flow.zeuslsp.com) and repeat step 3. The link opens the payment method screen, and coming back to the wallet screen triggers nothing.
Tested on a debug build with JS from 7c8cc23 (master, 3 Sep) plus four Cashu-only commits from #4555. The code in this report is the same on master 5792769: Wallet.tsx lines 1383-1428 are identical, and getLSPInfo differs only in its success path.
ZEUS version
v13.2.2
Node interface
LDK Node
Network
Clearnet
Device
Android emulator, Pixel 9 Pro (x86_64)
Device operating system
Android 16 (API 36)
Log output
LSP set to http://127.0.0.1:9:
[Wallet] connect time: 10.785s
[Wallet] handleFocus: triggering getSettingsAndNavigate (initialLoad=true, posWasEnabled=false, triggerSettingsRefresh=false, connecting=false)
Default LSP (control):
[Wallet] connect time: 11.816s
(no handleFocus line after coming back to the wallet screen)
Activity
kaloudis commentedon Sep 28, 2026
Thanks for the detailed report. Both problems are confirmed on current master, and #4782 fixes them in two commits (the catch, then the
flowLspNotConfigured()call). The missing catch also skipped the LSPS custom message subscription and the channel acceptor on embedded LND. Review and testing on #4782 are welcome.Wallet: test that startup runs Flow LSP setup and deep link handling