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

Unable to reconnect to node via LNC when network connection was down (e. g. airplane mode was on) #78

Open
myxmaster opened this issue Jun 8, 2023 · 3 comments

Comments

@myxmaster
Copy link

myxmaster commented Jun 8, 2023

I found this one while using Zeus, described it also there (ZeusLN/zeus#1483), but it probably needs to be fixed on LNC side.

Problem

When connected to a node via LNC and the connection breaks during app usage, it cannot be recovered (when you bring network connection down/up while Zeus runs in background, LNC connection is not permanently broken - no idea what this is about...). Not even when restarting the app.

I already tried to debug this and found, that the connectServer() method of the LncModule does not return an error, but the isConnected() method returns false every time.

Reproduce (using Zeus)

  • Connect to node via LNC (Lightning Node Connect)
  • Bring network connection down, e. g. by enabling airplane mode
  • Bring network connection up again
  • Refresh balance
    -> Error is shown after some time:

Error: rpc error: code = Unavailable desc = error reading from server: error decrypting payload: error receiving from go-back-n connection: cannot receive, gbn exited

  • Click restart button

->Error is shown:

Failed to connect the LNC client to the proxy server

@positiveblue
Copy link

I think I have experienced this myself.

When you say LNC connection is not permanently broken - no idea what this is about...). Not even when restarting the app., what do you mean? Stopping the app and starting it again does not solve the problem?

@myxmaster
Copy link
Author

myxmaster commented Jun 8, 2023

When network connection is brought down/up while Zeus runs in background, next Zeus app start does have issues (crash or endless loading), but after restarting the app, it works again. That is not the case when network connection is brought down/up during app usage - this will kill LNC connection and it can't recover (until a timeout which I don't know how long it takes).

@joergrs
Copy link

joergrs commented Aug 23, 2023

I am facing the same issue from time to time. My LND with LightingTerminal-LNC is running on a machine in my LAN.

To reproduce the problem I have to do the following steps

  1. With the phone in my local Wifi, open up Zeus -> connection OK
  2. Kill Zeus and wait for a minute
  3. Turn off Wifi -> phones switches to mobile data
  4. Open Zeus -> "Failed to connect the LNC client to the proxy server"

Once it is in this state, I have to wait for some time (10 to 30 minutes?) until I can use Zeus again. No matter if I'm on WiFi or mobile data.

If it helps, I could try to make a screencast of the process.

A fix would be really awesome 😎
As if this would happen while just having purchased something in a store that accepts Lightning, it would really kill the mood 😉

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants