Skip to content

Unreachable LSP at startup skips the opening deep link and later startup steps #4779

Closed

Description

@TheSeydiCharyyev

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:

zeus/views/Wallet/Wallet.tsx

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

  1. Use an LDK Node wallet on mainnet.
  2. Settings > Lightning Service Provider (LSP) > Just-in-time channels: set the LSP to http://127.0.0.1:9 (a closed port).
  3. 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
  4. Wait for the node to connect. The wallet screen opens, and the payment method screen does not.
Image
  1. 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.

Image

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

  1. kaloudis commented on Sep 28, 2026

    @kaloudis
    Contributor

    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.

  2. added this to the v13.2.3 milestone on Sep 28, 2026
  3. modified the milestones: v13.2.3, v13.2.4 on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions