Closed thenewgessiko closed 1 year ago
Something nil couldn't be accessed.
same, how to fix?
installed watgbridge_linux_amd64, version 1.2.1, ubuntu 22.04
Most probably you have not added the bot to the group chat or the chat id you have put in config is wrong. The ID should start with -100
{"level":"error","ts":1685481952.1088867,"logger":"WaTgBridge.WhatsMeow_Client","caller":"whatsapp/client.go:32","msg":"Event handler panicked while handling a events.Message: runtime error: invalid memory address or nil pointer dereference\ngoroutine 30 [running]:\nruntime/debug.Stack()\n\t/snap/go/current/src/runtime/debug/stack.go:24 +0x65\ngo.mau.fi/whatsmeow.(Client).dispatchEvent.func1()\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:594 +0x7d\npanic({0xec82a0, 0x17f16f0})\n\t/snap/go/current/src/runtime/panic.go:884 +0x213\nwatgbridge/whatsapp.MessageFromOthersEventHandler({0xc0005b9608, 0x12}, 0xc0001ad2c0)\n\t/go/src/watgbridge/whatsapp/handlers.go:1101 +0x9745\nwatgbridge/whatsapp.WhatsAppEventHandler({0xeaccc0?, 0xc0001ad2c0?})\n\t/go/src/watgbridge/whatsapp/handlers.go:95 +0x1049\ngo.mau.fi/whatsmeow.(Client).dispatchEvent(0xc00059c000?, {0xeaccc0, 0xc0001ad2c0})\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:598 +0xdc\ngo.mau.fi/whatsmeow.(Client).handleDecryptedMessage(0xc000489900?, 0xc0006ec240, 0xc000189800)\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:482 +0xce\ngo.mau.fi/whatsmeow.(Client).decryptMessages(0xc00059c000, 0xc0006ec240, 0xc0006dec60)\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:171 +0xae5\ngo.mau.fi/whatsmeow.(Client).handleEncryptedMessage(0xc00059c000, 0x0?)\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:49 +0x33f\ngo.mau.fi/whatsmeow.(Client).handlerQueueLoop(0xc00059c000, {0x11a3510, 0xc000582140})\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:559 +0x6b\ncreated by go.mau.fi/whatsmeow.(Client).Connect\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:313 +0x45b\n","stacktrace":"watgbridge/whatsapp.whatsmeowLogger.Errorf\n\t/go/src/watgbridge/whatsapp/client.go:32\ngo.mau.fi/whatsmeow.(Client).dispatchEvent.func1\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:594\nruntime.gopanic\n\t/snap/go/current/src/runtime/panic.go:884\nruntime.panicmem\n\t/snap/go/current/src/runtime/panic.go:260\nruntime.sigpanic\n\t/snap/go/current/src/runtime/signal_unix.go:837\nwatgbridge/whatsapp.MessageFromOthersEventHandler\n\t/go/src/watgbridge/whatsapp/handlers.go:1101\nwatgbridge/whatsapp.WhatsAppEventHandler\n\t/go/src/watgbridge/whatsapp/handlers.go:95\ngo.mau.fi/whatsmeow.(Client).dispatchEvent\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:598\ngo.mau.fi/whatsmeow.(Client).handleDecryptedMessage\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:482\ngo.mau.fi/whatsmeow.(Client).decryptMessages\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:171\ngo.mau.fi/whatsmeow.(Client).handleEncryptedMessage\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/message.go:49\ngo.mau.fi/whatsmeow.(Client).handlerQueueLoop\n\t/root/go/pkg/mod/go.mau.fi/whatsmeow@v0.0.0-20230522083828-ba5da011ba6d/client.go:559"