[BUG] LNbits >= 1.0: ISO 8601 time/expiry parsed as unix seconds, paid admissions never confirmed
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- typescript
Direção de pesquisa
Start with LNbitsPaymentsProcessor.getInvoice() and trace how details.time and details.expiry become invoice dates. Check the processor’s unit tests for numeric and ISO 8601 responses; done means paid invoices confirm and expired invoices retire for both formats. The issue author says a fix and tests are ready and plans to open a pull request.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Describe the bug
With LNbits >= 1.0 as the payments processor, paid admissions are never confirmed and expired invoices stay pending forever.
LNbits 1.x returns details.time and details.expiry from GET /api/v1/payments/{payment_hash} as ISO 8601 strings (e.g. "2025-10-11T15:24:27+00:00"); LNbits 0.x returned unix seconds. LNbitsPaymentsProcessor still does new Date(data.details.time * 1000) / new Date(data.details.expiry * 1000), which yields Invalid Date for strings. As a result:
PaymentsService.confirmInvoice→InvoiceRepository.confirmInvoicecallsconfirmedAt.toISOString()→RangeError: Invalid time value, so a user who paid the admission invoice is not admitted (both from the/callbacks/lnbitswebhook and from the maintenance worker poll);isExpiredInvoice()is false for an invalidexpiresAt, so unpaid invoices that LNbits still knows are re-saved aspendingon every maintenance pass and never retired.
To Reproduce
- Run nostream with
payments.enabled: true,payments.processor: lnbitsagainst LNbits 1.x (seen with 1.5.6). - Request an admission invoice at
/invoicesand pay it. - The invoice is not confirmed and the pubkey is not admitted; unpaid invoices past their expiry remain
pendingin theinvoicestable.
Unit-level reproduction: feed invoiceResponse({ data: { paid: true }, details: { time: '2025-10-11T15:24:27+00:00' } }) to LNbitsPaymentsProcessor.getInvoice() — confirmedAt is Invalid Date.
Expected behavior
Dates from LNbits are parsed correctly whether they come as unix seconds (LNbits < 1.0) or ISO 8601 strings (LNbits >= 1.0); paid invoices get confirmed, expired ones get retired.
System
- OS: Ubuntu 22.04
- Platform: docker (compose)
- Version: nostream 3.4.1 (same code in 2.1.0 and current
main); LNbits 1.5.6
Logs
On 3.4.1 after the upgrade, 15 old unpaid invoices that LNbits still knows were re-saved as pending every minute; with the fix applied they were retired as expired on the next maintenance pass.
Additional context
I have a small fix with unit tests ready (accept both a number and an ISO string in the LNbits processor) and will open a PR referencing this issue.
- Linguagem predominante
- TypeScript
- Estrelas
- 829
- Forks
- 234
- Merge médio
- 16h 13min
- PRs com merge (30d)
- 74
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cameri/nostream
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
Mantenedores costumam responder em até 1 dia
-
Website
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
[BUG] Upgrade from 2.x: EWMA rate limiter hits WRONGTYPE on sliding-window keys left in RedisAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 55/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
Mantenedores costumam responder em até 1 dia
-
feat(payments): let clients see their subscription tierTalvez já em andamento @Priyanshubhartistm assumiu há 1 dia. Abertaenhancement
cameri/nostream#925 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cameri/nostream
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Nimblesite/SharpLsp#468 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
Bundled uv is never updated and trusts the compromised eMudhra certificatesTalvez já em andamento @FabienDanieau assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
-
bg_wait's blocking mode (stopOnAttention: false) is under-documented and effectively undiscoverableAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
nicobailon/pi-subagents#3019 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
db-ux-design-system/core-web#8613 ·
Mantenedores costumam responder em até 1 dia