btcpayserver / btcpayserver

Accept Bitcoin payments. Free, open-source & self-hosted, Bitcoin payment processor.
https://btcpayserver.org/
MIT License
6.36k stars 1.65k forks source link

[Bug]: "Sequence contains no elements" testing external node connection #4246

Closed btcorigineez closed 1 year ago

btcorigineez commented 1 year ago

What is your BTCPay version?

I'm running v1.6.12.0

How did you deploy BTCPay Server?

Manual deployment from command line on Ubuntu Server

What happened?

Red banner pops up claiming "Sequence contains no elements" on the setup external lightning node page

How did you encounter this bug?

input the specific information for external LND lightning node, changed "mylnd:8080" to "localhost:8080", replacing "macaroon" with "macaroonfilepath" (following ministry of nodes YT series) and listed path to admin.macaroon, and added the certthumbprint

Relevant log output

Not aware of any relevant log info

What browser do you use?

Chrome

Additional information

No response

Are you sure this is a bug report?

pavlenex commented 1 year ago

@NicolasDorier Any ideas?

dennisreimann commented 1 year ago

@btcorigineez This looks like an exception, so there should be log output present on the Server Settings > Logs page. Can you try once more and attach the error you see in the logs?

btcorigineez commented 1 year ago

Hi all, I just added "debuglog=True" in my settings.config file in .btcpayserver/Main, restarted the btcpayserver service and then attempted to test the connection again, however the only log i'm seeing appears to be the service startup log.

2022-11-01 00:12:20.538 +00:00 [INF] Root Path: / 2022-11-01 00:12:21.313 +00:00 [INF] Starting listening NBXplorer (BTC) 2022-11-01 00:12:21.351 +00:00 [INF] Start watching invoices 2022-11-01 00:12:21.392 +00:00 [INF] Starting payment request expiration watcher 2022-11-01 00:12:21.498 +00:00 [INF] 0 pending payment requests being checked since last run 2022-11-01 00:12:21.519 +00:00 [INF] BTC: Checking if any pending invoice got paid while offline... 2022-11-01 00:12:21.618 +00:00 [INF] BTC: 0 payments happened while offline 2022-11-01 00:12:21.618 +00:00 [INF] Connected to WebSocket of NBXplorer (BTC)

Interestingly, although I still receive the "Sequence contains no elements" error when trying to test connection, if I save the external node setup and return to the dashboard, I can now see the correct amount of balances in my lightning node and the "lightning" wallet on the side appears green. However clicking on "lightning" wallet brings me to a page stating that my lightning node is "Unavailable".

Not entirely sure what to make of this. Thoughts? Any tests I should do to see if the pay server is actually working? Apologies for being new to the btcpayserver and lightning node setup. Thanks.

EDIT: sorry when I click on Lightning wallet and then "Public Node Info" I get brought to the page stating "Unavailable" Still seeing this after a service restart -Ian

dennisreimann commented 1 year ago

@btcorigineez Thanks for elaborating — it turns out that the node is indeed working, but it most likely has bo public addresses configured. #4263 deals with those cases.

Can you check the lnd.conf of your external node and see if it contains any externalip or externalhosts? See the sample lnd.conf for reference.