pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.54k stars 3.7k forks source link

Error: Evaluation failed: TypeError: msg._canRevoke is not a function #1822

Closed RC047 closed 1 year ago

RC047 commented 1 year ago

Is there an existing issue for this?

Describe the bug

Error: Evaluation failed: TypeError: msg._canRevoke is not a function at puppeteer_evaluation_script:4:33 at ExecutionContext._evaluateInternal (C:\Users\rendy\OneDrive\Desktop\kuhong-bot-v3\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ExecutionContext.evaluate (C:\Users\rendy\OneDrive\Desktop\kuhong-bot-v3\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) at async Message.delete (C:\Users\rendy\OneDrive\Desktop\kuhong-bot-v3\node_modules\whatsapp-web.js\src\structures\Message.js:436:9) at async Object.handler (C:\Users\rendy\OneDrive\Desktop\kuhong-bot-v3\main.js:705:20)

Expected behavior

-

Steps to Reproduce the Bug or Issue

When the <Message>.delete(true) function called

Relevant Code

-

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows 10 Enterprise whatsapp-web.js version: 1.18.3 (latest) WhatsApp Web Version: 2.2244.6 Node.js Version: 16.17.1

Additional context

-

Ajitweb commented 1 year ago

~~No error on receipt of text messages. But I get the above error on receipt of images, docs etc~~

Sorry, I get the error on deleting a message. I was actually deleting all type of messages except for chat messages whatsupmessage.delete(true) This is the line in my code which gives the error

RC047 commented 1 year ago

~No error on receipt of text messages. But I get the above error on receipt of images, docs etc~

Sorry, I get the error on deleting a message. I was actually deleting all type of messages except for chat messages whatsupmessage.delete(true) This is the line in my code which gives the error

Yes, that's what I mean

andrejoseo commented 1 year ago

same here