YOU-API / go-wppserver

Free WhatsApp REST API. Send messages with the unofficial WhatsApp API. It's free and unlimited. The server is delivered as a lightweight binary, using only about 2 to 8 MB of memory and has a total size of around 15-20 MB. Visit the releases page to download the pre-compiled binaries. It supports multi-platform and Docker.
https://you-api.github.io/go-wppserver/
Other
3 stars 1 forks source link

panic: runtime error: invalid memory address or nil pointer dereference #2

Open ichimarurei opened 4 months ago

ichimarurei commented 4 months ago

would please help me got error

2024/05/27 05:21:26 whatsapp.go:97: No valid jid found. Creating new device

05:21:26.535 [Client/Socket DEBUG] Dialing wss://web.whatsapp.com/ws/chat

05:21:27.036 [Client/Socket DEBUG] Frame websocket read pump starting 0xc0003f40b0

2024/05/27 05:21:27 whatsapp.go:142: Disconnecting to Whatsapp:  <nil>

panic: runtime error: invalid memory address or nil pointer dereference

[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x929893]

goroutine 21 [running]:

wppserver/pkg/whatsapp.(*Device).DisconnectClient(0x0)

    /app/pkg/whatsapp/whatsapp.go:144 +0x53

wppserver/pkg/whatsapp.(*Devices).Remove(0xc0003ac0b0, {0x3, 0xdf, 0x12, 0x2d, 0xc, 0x37, 0x11, 0xef, 0xad, ...})

    /app/pkg/whatsapp/whatsapp.go:213 +0x45

wppserver/internal/app.(*App).connectDevices(0xc000288000)

    /app/internal/app/app.go:170 +0x4fe

wppserver/internal/app.(*App).Initialize(0xc000288000, 0xc0002ce000)

    /app/internal/app/app.go:42 +0xa5

main.(*program).run(0x0?, {0x0?, 0x0?, 0x0?})

    /app/cmd/main.go:43 +0xfa

created by main.(*program).Start

    /app/cmd/main.go:28 +0x14a