#Client.getChatById() throws TypeError: Cannot read properties of undefined (reading '_serialized')

6 messages · Page 1 of 1 (latest)

dire gyro
#

I got this error when calling getChatById() function. (Not everytime, just sometimes)

Using

  • wwebjs 1.20.0
  • WhatsApp Web 2.2321.6,
  • New logged in session
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading '_serialized')
    at window.WWebJS.getChatModel (__puppeteer_evaluation_script__:339:75)
    at window.WWebJS.getChat (__puppeteer_evaluation_script__:355:36)
    at async __puppeteer_evaluation_script__:2:20
    at ExecutionContext._evaluateInternal (C:\work\WhatsAppSender\server\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (C:\work\WhatsAppSender\server\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
    at async Client.getChatById (C:\work\WhatsAppSender\server\node_modules\whatsapp-web.js\src\Client.js:814:20)
prime lark
#

same error

strong prairie
#

Downgrade to the 1.19.5 and try.

prime lark
prime lark
#

This happens only with new chats...
Trying to find what came on injected to fix it.

prime lark