[BUG] Relay invoices are not retried when local persistence fails
Maintainers usually reply within 2 days
@Mansi2007275 is already working on this.
Since Oct 21, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
Research direction
Read frontend/src/page/ReceivedInvoice.jsx around storeRelayInvoice() and the initial catch-up setup, then trace retry and deduplication in frontend/src/services/relay/relayInvoiceMessaging.js. Start with the existing retry test in frontend/tests/services/relayInvoiceMessaging.test.js and add coverage for failed persistence in both paths. Done means the message is retried after a transient save failure and appears once persistence succeeds.
Written by the indexing model from the issue text.
Description
Bug Description
[BUG] Relay invoices are not retried when local persistence fails
Bug Description
The Received Invoices relay flow can permanently skip a message for the current session when saving its verified invoice payload to IndexedDB fails.
In frontend/src/page/ReceivedInvoice.jsx, storeRelayInvoice() catches storage errors and returns false. However, the initial catch-up passes every fetched message ID into knownMessageIds, including messages that failed to save.
The live polling path has a related issue: its onInvoice callback does not throw when storeRelayInvoice() returns false. In frontend/src/services/relay/relayInvoiceMessaging.js, the poller retries a message only when its handler throws. Therefore, a failed save can also be treated as successfully handled during live polling.
Affected Code
frontend/src/page/ReceivedInvoice.jsx—storeRelayInvoice()error handling and initial catch-up/poll setup, approximately lines 903–963.frontend/src/services/relay/relayInvoiceMessaging.js— message deduplication and retry behavior, approximately lines 180–205.frontend/tests/services/relayInvoiceMessaging.test.js— existing test for retrying when the handler throws.
Steps to Reproduce
- Open Received Invoices with relay messaging configured.
- Deliver a valid invoice message.
- Simulate an IndexedDB write failure while the application processes the message.
- Allow the next polling cycle to run with the same relay message available.
Actual Behavior
The failed invoice may not appear in Received Invoices, and the message may be skipped for the remainder of the session because its ID has already been marked as seen.
Reloading the application may trigger another initial catch-up and allow the invoice to be saved if storage is working again.
Expected Behavior
A message should only be considered successfully processed after its verified invoice payload has been persisted, or otherwise handled according to an explicit permanent-failure policy.
Transient storage failures should leave the message eligible for retry in both the initial catch-up and live polling paths.
Suggested Regression Test
Simulate a valid relay message whose local persistence fails once and succeeds on a subsequent attempt. Verify that the message is retried without requiring an application reload and that it appears once persistence succeeds.
Cover both:
- Initial catch-up where
storeRelayInvoice()returnsfalse. - Live polling where the storage failure is caught inside
storeRelayInvoice().
Verification Status
The control-flow problem is supported by source inspection. Runtime reproduction and frontend tests have not been completed in the inspected checkout because the required Jest dependencies were unavailable.
Steps to Reproduce
No response
Logs and Screenshots
No response
Environment Details
No response
Impact
Critical - Application is unusable
Code of Conduct
- I have joined the Discord server and will post updates there
- I have searched existing issues to avoid duplicates
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 62
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 18
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/Chainvoice
-
[BUG]: Smart Batch Suggestions ignore active filters and select invoices hidden from the tablePossibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#331 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoices with the same date are sorted out of order (ids compared as strings)Possibly taken @anshulchikhale30-p claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
StabilityNexus/Chainvoice#330 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Stale token-list requests can overwrite state after switching networksPossibly taken @JANAKIRAM218 claimed this 10 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
StabilityNexus/Chainvoice#325 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: Invoice PDF totals overlap the footer with 10 line itemsMay be free again A pull request for this issue was closed without being merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
StabilityNexus/Chainvoice#310 · 4 comments ·
Maintainers usually reply within 2 days
-
[BUG]: Batch invoice summary truncates displayed amount precision to four decimal placesPossibly taken @JANAKIRAM218 claimed this 29 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
StabilityNexus/Chainvoice#294 · 2 comments ·
Maintainers usually reply within 2 days
All issues in StabilityNexus/Chainvoice
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day