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

issue with the library

Open allthingssecurity opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the bug

I get an exception after i scan the QR code whatsapp\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:255 throw new Error('Evaluation failed: ' + (0, util_js_1.getExceptionMessage)(exceptionDetails)); ^

Error: Evaluation failed: ReferenceError: __name is not defined at moduleRaid (eval at (:1:18), :1:103) at pptr://puppeteer_evaluation_script:1:68 at ExecutionContext._ExecutionContext_evaluate (c:\chatgpt\whatsapp\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:255:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at ExecutionContext.evaluate (c:\chatgpt\whatsapp\node_modules\puppeteer-core\lib\cjs\puppeteer\common\ExecutionContext.js:143:16) at Client.initialize (c:\chatgpt\whatsapp\node_modules\whatsapp-web.js\src\Client.js:267:9)

Node.js v18.13.0

Expected behavior

expected behavior is to succesfully scan QR code. It was working for sometime and then started failing

Steps to Reproduce the Bug or Issue

I used the example code and ran it via const qrcode = require('qrcode-terminal');

const { Client } = require('whatsapp-web.js'); const client = new Client();

client.on('qr', qr => { qrcode.generate(qr, {small: true}); });

client.on('ready', () => { console.log('Client is ready!'); });

client.initialize(); client.on('message', message => { console.log(message.body); });

npx tsx filename

Relevant Code

example code I used

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Windows Node latest version

Additional context

Nothing additional

allthingssecurity avatar Feb 17 '23 13:02 allthingssecurity

Started happening to me recently also, been running fine for about a month and all of a sudden now I get this error.

hassanoza22 avatar Feb 17 '23 21:02 hassanoza22

Happened to me too.

DanielSLucas avatar Apr 20 '23 18:04 DanielSLucas