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

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

Open reinforcers opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

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

reinforcers avatar May 09 '22 02:05 reinforcers

Im same problebm

Adilmar avatar Jul 05 '22 01:07 Adilmar

Fixed in latest lib version

alechkos avatar Dec 04 '23 21:12 alechkos