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

Evaluation failed: k

Open AlAreqi320 opened this issue 1 year ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

Failed to send group messages

Expected behavior

Evaluation failed: k

Steps to Reproduce the Bug or Issue

Evaluation failed: k

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows Phone: Android wwebversion: '2.2319.9' wwebjsversion: '1.19.5' Node.js Version: v18.4.0

Additional context

No response

AlAreqi320 avatar May 06 '23 15:05 AlAreqi320

Has anyone been able to solve this issue?

hayzedDev avatar May 06 '23 21:05 hayzedDev

Facing same issue while group creation

vold-la avatar May 07 '23 07:05 vold-la

I have the same problem

image

ivnascimento avatar May 08 '23 13:05 ivnascimento

Here too with the same problem. Can anyone help? When sending messages, the message does not reach the contact.

henbastos avatar May 08 '23 13:05 henbastos

I managed to solve the problem, chrome was out of date on the server.

ivnascimento avatar May 08 '23 16:05 ivnascimento

I managed to solve the problem, chrome was out of date on the server.

How were you able to update chrome

hayzedDev avatar May 08 '23 17:05 hayzedDev

My server is Ubuntu Server and I used these commands to update.

1 - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

2 - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

3 - sudo apt-get update

4 - This command below is to remove the current version of chrome and then do a clean installation.

sudo apt-get remove google-chrome-stable

5 - Installation of the latest version of Chrome:

sudo apt-get install google-chrome-stable

ivnascimento avatar May 08 '23 18:05 ivnascimento

I get the error even after following above solutions. The error is specifically on calling Client.getChats only.

Here is the error stack:

Error: Evaluation failed: k
    at ExecutionContext._evaluateInternal (/home/abcd/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (/home/abcd/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async Client.getChats (/home/abcd/node_modules/whatsapp-web.js/src/Client.js:725:21)

I felt it could be related to Update available message, I had to update WhatsApp, and then disconnect from phone and reconnect. However that DID NOT fix the error:

image

One thing remaining is a message on Linked Devices section of the app: "Syncing. Keep app open.". Doesn't seem to go. Though cannot be 100% sure if its related.

Client.getChats is still not functional.

Client.getChatById is functional.

liveaspankaj avatar May 09 '23 08:05 liveaspankaj

Also got this issue on client.getChats() Updating chrome did not help :(

Soneji avatar May 09 '23 14:05 Soneji

Working for me

When I start my connection and call the wbot's getChats() function right after, it gives me the k evaluation error, but if I don't call the function at the start of the wbot and call the function after a while it works.

Rharan-Ru avatar May 10 '23 19:05 Rharan-Ru

Working for me

When I start my connection and call the wbot's getChats() function right after, it gives me the k evaluation error, but if I don't call the function at the start of the wbot and call the function after a while it works.

Works fine for me! Tks!

cpetrag avatar May 11 '23 10:05 cpetrag

My server is Ubuntu Server and I used these commands to update.

1 - sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

2 - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

3 - sudo apt-get update

4 - This command below is to remove the current version of chrome and then do a clean installation.

sudo apt-get remove google-chrome-stable

5 - Installation of the latest version of Chrome:

sudo apt-get install google-chrome-stable

I did it and changed a bit the code. But it's just a workaround!

Client.js file:

code

Joao-Bradial avatar May 12 '23 18:05 Joao-Bradial