Exceção ao tentar deletar uma instância com o handleQRCodes em andamento
Maintainers usually reply within 9 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
The panic is in pkg/whatsmeow/service/whatsmeow.go at teardownQR (line 852) called from handleQRCodes (line 742). Read those functions to understand the channel lifecycle and the race with instance deletion. Add synchronization so send on closed channel cannot happen. Done means deletion during QR generation stops cleanly without panic.
Written by the indexing model from the issue text.
Description
Welcome!
- Yes, I have searched for similar issues on GitHub and found none.
What did you do?
Através de captura de eventos via rabbitMQ, quando eu capturo o evento "QRTimeout" através de um consumer pelo RabbitMQ e, no mesmo momento o consumer tentou deletar a instância para interromper a geração do QRCode e parar de consumir recursos da máquina
What did you expect?
A instância ser deletada e a geração de QRCode ser interrompida
What did you observe instead of what you expected?
O serviço do evolutionGO lança uma exceção e é interrompido completamente, precisando reiniciar o serviço do docker
Screenshots/Videos
No response
Which version are you using?
0.7.2
What is your environment?
Docker
If applicable, paste the log output
whatsapp-1 | panic: send on closed channel
whatsapp-1 |
whatsapp-1 | goroutine 525 [running]:
whatsapp-1 | github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).teardownQR(0xc0018a8480, {0xc000a04330, 0x21}, 0x1)
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:852 +0x953
whatsapp-1 | github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).handleQRCodes.func1()
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:742 +0xec5
whatsapp-1 | created by github.com/evolution-foundation/evolution-go/pkg/whatsmeow/service.(*MyClient).handleQRCodes in goroutine 523
whatsapp-1 | /build/pkg/whatsmeow/service/whatsmeow.go:704 +0x86
Additional Notes
No response
- Dominant language
- Go
- Stars
- 1k
- Forks
- 610
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- No 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 evolution-foundation/evolution-go
-
/user/info and /user/avatar hang for 75s when number is a phone numberPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
evolution-foundation/evolution-go#223 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
evolution-foundation/evolution-go#193 ·
Maintainers usually reply within 9 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
evolution-foundation/evolution-go#104 ·
Maintainers usually reply within 9 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
evolution-foundation/evolution-go#101 ·
Maintainers usually reply within 9 days
-
POST /group/participant always returns 400 "participants is required and cannot be empty" (wrong validation middleware on route)Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
evolution-foundation/evolution-go#97 · 2 comments ·
Maintainers usually reply within 9 days
All issues in evolution-foundation/evolution-go
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
kaiachain/kaia#1143 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation factory:ready
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
good first issue spec
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
docs
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
open-telemetry/opentelemetry.io#12846 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day