btcpayserver-plugins icon indicating copy to clipboard operation
btcpayserver-plugins copied to clipboard

[Bug]: Lightning payment did not fail /eventually) but shown failed in "invoices"

Open k9ert opened this issue 2 years ago • 2 comments

What is your BTCPay version?

v1.6.10.0

How did you deploy BTCPay Server?

Lunanode

What happened?

A connected Woocommerce created an invoice which got expired but got paid 12 days after. However, the Status of that invoice did not changed to settled.

Some screenshots: Selection_083 Selection_084 Selection_085 Selection_086

Shouldn't the invoice change? One should add that around the more or less same time, the amount got paid via onchain ( the tx got confirmed on 2022-09-17 ). That's the reason an onchain-payment ist shown as well in the screenshots.

As a remark: LN-Bank is used and the amount showed up properly in the corresponding account.

How did you encounter this bug?

See above.

Relevant log output

To be delivered if necessary.

What browser do you use?

Browser probably not relevant but firefox.

Additional information

No response

Are you sure this is a bug report?

  • [X] I confirm this is a bug report

k9ert avatar Sep 22 '22 17:09 k9ert

This is most likely related to the still occuring bug in LNbank, in which the invoice watcher hangs/stops/exits and does not handle payments anymore. I still have to get to the root cause, but from the investigation we had in DMs it looks like the invoice was paid, but just not marked as paid. RTL shows the payment — the onchain payment that came in later was superfluous, so it should be refunded.

For now I can only advise to upgrade to BTCPay v1.6.11 and LNbank v1.3.1 in which I added more logging and also timeouts for the invoice status lookups — one assumption I have is that the watcher might run into cases where it got stuck looking up e.g. hold invoices. We'll have to see and debug this further. Sorry for the inconveniences!

dennisreimann avatar Sep 27 '22 09:09 dennisreimann

@dennisreimann should we move this to a plugin repo if we're confident it's LNBank problem?

pavlenex avatar Sep 28 '22 08:09 pavlenex