event icon indicating copy to clipboard operation
event copied to clipboard

connection not possible when switching from LNC node to another node and back

Open myxmaster opened this issue 1 year ago • 2 comments

Describe the bug

(Might be related to https://github.com/ZeusLN/zeus/issues/1483, but not sure.)

When you are connected to a node via LNC, then switch to another node and then back to the LNC node again, Zeus cannot connect and displays "Failed to connect the LNC client to the proxy server". Using the "Restart" button or killing the app fixes the problem and Zeus will connect to the LNC node again.

The connect method in LNC class runs through fine (no error): https://github.com/ZeusLN/zeus/blob/e0125a6fab3bdb0ebbcb61c890876e0448c7f0fd/zeus_modules/%40lightninglabs/lnc-rn/lib/lnc.ts#L94-L130

What happens, when the error occurs, is: BackendUtils.isConnected() keeps returning false until Zeus gives up: https://github.com/ZeusLN/zeus/blob/e0125a6fab3bdb0ebbcb61c890876e0448c7f0fd/stores/SettingsStore.ts#L1212-L1225

I made sure BackendUtils.isConnected() is really calling isConnected() in LNC class, so question is: why is it not possible to establish a connection when switching nodes like this?

Edit: I can reproduce this issue with Zeus v0.8.0 on my physical device (Galaxy Tab S9+, Android 13) and emulator (Android Emulator Pixel 7 Pro, Android 14). I can not reproduce it with Zeus v0.7.7 on my physical device (Samsung Galaxy S20+, Android 13).

Reproduce

Zeus version

v0.8.0

Node interface

LND (Lightning Node Connect)

Network

Clearnet

Device

Android Emulator Pixel 7 Pro

Device operating system

Android 14

Log output

No response

myxmaster avatar Oct 19 '23 22:10 myxmaster

I have a similar issue just around LNC connected Zeus just timing out. I have to restart the app every single time I use it. It always connects reliably upon restart though.

edit: running grapheneOS, zeus v0.8.2, friend has exact same issue on iPhone with whatever version is on the app store.

BitcoinMechanic avatar Mar 25 '24 19:03 BitcoinMechanic

Maybe the disconnect call isn't getting executed properly, or perhaps we have a system issue. Would be nice to get some more clarity.

kaloudis avatar Mar 31 '24 21:03 kaloudis