You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when sending a payment we get the following logs:
2024-09-02T02:31:39.942959744+00:00 INFO lndk::server - Received a request: PayOfferRequest { offer: "lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrc2zfjx7mnpw35k7m3qw3hjqetrd3skjuskyyp9rukfmyt66fshn8mdztq8u66lqc78t5mvr9mmxr90rpqwfcwc20q", amount: Some(10000), payer_note: None, response_invoice_timeout: Some(15) }
2024-09-02T02:31:40.127491291+00:00 DEBUG lndk::lndk_offers - In invoice request, we chose 02981e025eea62bf1ef5643a303edfa287ed4ad236d8604ed340c36ac705ab2ac0 as the introduction node of the reply path
2024-09-02T02:31:40.223949647+00:00 TRACE ldk - Failed to find path when sending OffersMessage
2024-09-02T02:31:40.629845903+00:00 DEBUG lndk::onion_messenger - Peer events sent: PeerConnected(PublicKey(3c851d4e0e84f1ca307b97c1365dc763f0b5e6072cd1f6991726ad17d9c9f2515a60f2335653e7ce1688ac878f7ca90136d06d5ac448536c46fa69667d423152), true).
2024-09-02T02:31:40.629871467+00:00 INFO lndk::onion_messenger - Consume messenger events received: messenger event: 0251f2c9d917ad261799f6d12c07e6b5f063c75d36c1977b30caf1840e4e1d853c connected, onion message support: true.
2024-09-02T02:31:55.129010939+00:00 ERROR lndk - Did not receive invoice in 15 seconds.
Expected behavior: What should happen is once we get to ldk - Failed to find path when sending OffersMessage, the payment should fail and return the error to the user.
Actual behavior: But what actually happens is it waits another 15 seconds for an invoice to come back, and returns a timeout error to the user.
In addition to making the user wait longer than they need to, it also falsely gives users the impression that we already sent the invoice request and the problem is the offer node we're communicating with didn't send back an invoice. When in reality the problem is that we couldn't find a route to send the invoice request.
To Reproduce
This can be replicated on bolt12 playground when paying Eclair2 for the first time (subsequent calls will work properly).
Describe the bug
Sometimes when sending a payment we get the following logs:
Expected behavior: What should happen is once we get to
ldk - Failed to find path when sending OffersMessage
, the payment should fail and return the error to the user.Actual behavior: But what actually happens is it waits another 15 seconds for an invoice to come back, and returns a timeout error to the user.
In addition to making the user wait longer than they need to, it also falsely gives users the impression that we already sent the invoice request and the problem is the offer node we're communicating with didn't send back an invoice. When in reality the problem is that we couldn't find a route to send the invoice request.
To Reproduce
This can be replicated on bolt12 playground when paying Eclair2 for the first time (subsequent calls will work properly).
Additional context
Fixing this is a little more complicated than it looks. That's because
ldk - Failed to find path when sending OffersMessage
is an error that occurs when ldk's DefaultMessengeRouter is called: https://github.com/lightningdevkit/rust-lightning/blob/475f736c22c8dd1b3169bc13c0aa46a558459b7b/lightning/src/onion_message/messenger.rs#L847. So with the way things are setup currently, the only way to handle this error in the OfferHandler is to directly is to override the DefaultMessageRouter. See an example of this here: #172The text was updated successfully, but these errors were encountered: