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
14.53k stars 3.46k forks source link

Evaluation failed: k #2188

Closed AlAreqi320 closed 11 months ago

AlAreqi320 commented 1 year ago

Is there an existing issue for this?

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

hayzedDev commented 1 year ago

Has anyone been able to solve this issue?

vold-la commented 1 year ago

Facing same issue while group creation

ivnascimento commented 1 year ago

I have the same problem

image
henbastos commented 1 year ago

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

ivnascimento commented 1 year ago

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

hayzedDev commented 1 year ago

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

How were you able to update chrome

ivnascimento commented 1 year ago

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

liveaspankaj commented 1 year ago

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.

Soneji commented 1 year ago

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

Rharan-Ru commented 1 year ago

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.

cpetrag commented 1 year ago

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!

Joao-Bradial commented 1 year ago

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