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.39k stars 3.67k forks source link

I am connected but can`t send messages on ubuntu #1253

Closed john-mbone closed 2 years ago

john-mbone commented 2 years ago

Bug description

A clear and concise description of what the bug is.

Reproduction steps

Steps to reproduce the behavior:

  1. Connect Scan on Multi Device 2.After sometimes messages can not be sent ...

home/ubuntu/.pm2/logs/wezesha-bot-error-0.log last 15 lines: 0|wezesha- | at puppeteer_evaluation_script:10:45 0|wezesha- | at ExecutionContext._evaluateInternal (/var/www/wezesha/bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js :221:19) 0|wezesha- | at runMicrotasks () 0|wezesha- | at processTicksAndRejections (node:internal/process/task_queues:96:5) 0|wezesha- | at async ExecutionContext.evaluate (/var/www/wezesha/bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:11 0:16) 0|wezesha- | at async Client.sendMessage (/var/www/wezesha/bot/node_modules/whatsapp-web.js/src/Client.js:605:28) 0|wezesha- | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection: 0|wezesha- | Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'canReply') 0|wezesha- | at Object.window.WWebJS.sendMessage (puppeteer_evaluation_script:53:31) 0|wezesha- | at puppeteer_evaluation_script:10:45 0|wezesha- | at ExecutionContext._evaluateInternal (/var/www/wezesha/bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js :221:19) 0|wezesha- | at runMicrotasks () 0|wezesha- | at processTicksAndRejections (node:internal/process/task_queues:96:5) 0|wezesha- | at async ExecutionContext.evaluate (/var/www/wezesha/bot/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:11 0:16) 0|wezesha- | at async Client.sendMessage (/var/www/wezesha/bot/node_modules/whatsapp-web.js/src/Client.js:605:28)

Expected behavior

A clear and concise description of what you expected to happen.

Relevant code

If applicable, add code snippets to help explain your problem.

Environment (please complete the following information):

WhatsApp

Library

Other

KeruMx commented 2 years ago

0|wezesha- | Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'canReply') that property in message doesnt exists