LN-Zap / zap-iOS

Zap Wallet - Native iOS lightning wallet focused on user experience and ease of use ⚡️
http://zaphq.io
MIT License
181 stars 47 forks source link

Accessing remote node over Tor usually fails #332

Open craigraw opened 4 years ago

craigraw commented 4 years ago

I have been using Zap (currently 0.5.1) to connect to my remote node (currently lnd 0.8.1) for some time, and recently reconfigured lnd to use a Tor connection.

Having updated the Zap configuration using the Raspibolt guide I can occasionally get Zap to connect to the node, but it usually fails.

Steps to reproduce the behavior:

  1. Open Zap
  2. On 'Manage Wallets' screen
  3. Click on wallet corresponding to node
  4. Zap shows wallet main screen, but with gray glowing blocks and inactive buttons (no wallet balance etc)
  5. Usually, Zap returns to 'Manage Wallets' screen after a variable number (0 to 20) seconds.

It appears that the code handling the connection to the node fails after a random interval. It does appear that a clean/hard restart of Zap helps (but not every time), and the more times you try between hard restarts the shorter the time before you are returned to the 'Manage Wallets' screen. After a hard restart I can connect to the node perhaps 50% of the time, and it takes around 15 to 20 seconds to do so.

I've tested my LND Rest interface with curl over Tor and everything appears fine.

ProofOfKeags commented 3 years ago

This is still an issue.

penguin4111 commented 3 years ago

I still have this issue. Connecting via Tor to zap iOS works but only after resetting and trying again and again. Not sure why. It’s also very slow when it does connect, but is functional (I have tried sending and receiving and it’s all fine)

ProofOfKeags commented 3 years ago

I discovered that this issue was solved by using the REST endpoint as opposed to the gRPC endpoint, which is extremely odd since I thought that Zap used gRPC exclusively.

penguin4111 commented 3 years ago

Can you elaborate? Is this a setting I can change with LNDconnect or some .conf file?

ProofOfKeags commented 3 years ago

we literally just changed the port from 10009 to 8080