Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Irreparable crash when paying LN invoice to user with app closed #1494

Closed
ovitrif opened this issue Jan 12, 2024 · 0 comments · Fixed by synonymdev/react-native-ldk#200 or #1497
Assignees
Labels
bug Something isn't working triage This issue needs to be looked over by the team

Comments

@ovitrif
Copy link
Contributor

ovitrif commented Jan 12, 2024

Describe the bug

Note: I get the feeling this is android only.

I managed to get the Android app in a state where it became impossible to get access to my wallet/funds, because it would always crash afterwards.

The repro flow involves paying an instant invoice (LN) to a user that doesn't have the app open.

Once a user attemps to make such a payment, their app will keep crashing effectively preventing them to ever open it and access their funds.

There's currently no way to recover from this error for the end user:

  • if they clear app cache/data, then attempt to restore their wallet they end up in the same crash cycle
  • if they uninstall/reinstall, wallet recovery flow will get them in the same endless crash cycle

Reproduce

You need 2 android devices / simulators for this, we'll name the two: Alice and Bob, which correspond to device 1 and device 2.

  1. As Alice, create an instant payment invoice then quickly close the app.
  2. As Bob, first make sure you have enough spending balance, then
    • try to pay the invoice
    • 🔴 Your app will crash and never recover.

The issue can be reproduced always with the same flow.

Screenshots / Recording

blockAndroidBug.mp4

Operating system

Android 14 & 13

Bitkit version

v94

Log output

Found this in Flipper logs:

java.lang.ClassCastException: org.ldk.structs.Option_u64Z$None cannot be cast to org.ldk.structs.Option_u64Z$Some
System.err
	at com.reactnativeldk.classes.LdkChannelManagerPersister.handle_event(LdkChannelManagerPersister.kt:88)
2024-01-12T17:22:58.416Z
13017
System.err
	at org.ldk.batteries.ChannelManagerConstructor$$ExternalSyntheticLambda0.handle_event(Unknown Source:2)
System.err
	at org.ldk.structs.EventHandler$1.handle_event(EventHandler.java:58)
..........
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be looked over by the team
Projects
None yet
1 participant