whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Cannot read properties of undefined (reading 'canReply')

Open Mohammed-800 opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

has issus with when eplay to message

Expected behavior

client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });

Steps to Reproduce the Bug or Issue

client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });

Relevant Code

client.sendMessage(chatid, MessageText, { 'quotedMessageId': quotedMsgId });

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: [e.g. Mac, Windows, Linux, Docker + Ubuntu 18, etc] Phone OS: [e.g. Android, iOS] whatsapp-web.js version [e.g. 1.2.3] WhatsApp Web version [run await client.getWWebVersion()]: Node.js Version [e.g. 1.2.3]

Additional context

sd

Mohammed-800 avatar Jun 28 '22 21:06 Mohammed-800

So guys, I was having a similar issue to get the group-names, the problem was fixed after I delete my auth-session and create a new one.

FabianoLothor avatar Jul 11 '22 19:07 FabianoLothor

I caught the same error "Cannot read properties of undefined (reading 'canReply')"

rndmax avatar Aug 17 '22 12:08 rndmax

I am getting this error Cannot read properties of undefined (reading 'canReply')

although it was working just fine before

i removed the if condition 🙃 in Injected.js

if (quotedMessage.canReply()) {.....}

now message.reply() works for me

IslamYA avatar Oct 27 '22 03:10 IslamYA

@Islam-Mohammed-Younes This has been fixed in 1.18.2. Please update again!

EDIT: actually, the error that was fixed is Error: Evaluation failed: TypeError: quotedMessage.canReply is not a function, but if you're getting an issue with replies after the latest whatsapp change this is probably what you were seeing instead.

pedroslopez avatar Oct 27 '22 03:10 pedroslopez

@pedroslopez Thanks !

Thats correct the error actually was canReply is not a function

i copied @rndmax error by mistake

IslamYA avatar Oct 27 '22 03:10 IslamYA