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.05k stars 3.58k forks source link

error after a while, Evaluation failed: TypeError: Cannot read properties of undefined (reading 'notSpam') #1445

Closed reinforcers closed 9 months ago

reinforcers commented 2 years ago

Is there an existing issue for this?

Describe the bug

after login creating this error after a while

Expected behavior

expected to run normally since no new code added

Steps to Reproduce the Bug or Issue

  1. scan qr
  2. authenticated
  3. message in / out
  4. error and close
  5. can't reconnect

error message

/root/wa/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221
            throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
                  ^

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'notSpam')
    at m.isTrusted (https://web.whatsapp.com/bootstrap_qr.7585ad81c65e2056813e.js:69:597834)
    at m.downloadMedia (https://web.whatsapp.com/bootstrap_qr.7585ad81c65e2056813e.js:69:599376)
    at __puppeteer_evaluation_script__:6:27
    at ExecutionContext._evaluateInternal (/root/wa/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/root/wa/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
    at async Message.downloadMedia (/root/wa/node_modules/whatsapp-web.js/src/structures/Message.js:372:24)
    at async Client.<anonymous> (/root/wa/wa-server.js:160:19)

Relevant Code

No response

Browser Type

Google Chrome

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Rocky Linux Phone OS: Android whatsapp-web.js version 1.16.6 Node version 16.13.1

Additional context

on WhatsApp Standard working with no problem

Adilmar commented 2 years ago

Im same problebm

alechkos commented 9 months ago

Fixed in latest lib version