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.62k stars 3.48k forks source link

After using webcashe #3037

Closed UmairHashmi90 closed 2 months ago

UmairHashmi90 commented 2 months ago

Is there an existing issue for this?

Describe the bug

using whatsapp-web.js 1.23.0 and code

const wwebVersion = '2.2410.1'; const client = new Client({ restartOnAuthFail: true, puppeteer: { args: [ '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-accelerated-2d-canvas', '--no-first-run', '--no-zygote', '--single-process', // <- this one doesn't works in Windows '--disable-gpu' ], headless: true, },

webVersionCache: {
    type: 'remote',
    remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
},
authStrategy: new LocalAuth({
  clientId: id,
}),

});

0|app-multiple-account | Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') 0|app-multiple-account | at puppeteer_evaluation_script:5:95 0|app-multiple-account | at ExecutionContext._evaluateInternal (C:\whatsapp\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) 0|app-multiple-account | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 0|app-multiple-account | at async ExecutionContext.evaluate (C:\whatsapp\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) 0|app-multiple-account | at async Client.initialize (C:\whatsapp\node_modules\whatsapp-web.js\src\Client.js:323:9)

Expected behavior

0|app-multiple-account | Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') 0|app-multiple-account | at puppeteer_evaluation_script:5:95 0|app-multiple-account | at ExecutionContext._evaluateInternal (C:\whatsapp\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19) 0|app-multiple-account | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 0|app-multiple-account | at async ExecutionContext.evaluate (C:\whatsapp\node_modules\whatsapp-web.js\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16) 0|app-multiple-account | at async Client.initialize (C:\whatsapp\node_modules\whatsapp-web.js\src\Client.js:323:9)

Steps to Reproduce the Bug or Issue

scan and make it ready

Relevant Code

const wwebVersion = '2.2410.1'; const client = new Client({ restartOnAuthFail: true, puppeteer: { args: [ '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage', '--disable-accelerated-2d-canvas', '--no-first-run', '--no-zygote', '--single-process', // <- this one doesn't works in Windows '--disable-gpu' ], headless: true, },

webVersionCache: {
    type: 'remote',
    remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
},
authStrategy: new LocalAuth({
  clientId: id,
}),

});

Browser Type

Chromium

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

node v20.11.1

Additional context

Urgent

alechkos commented 2 months ago

2789

2816