ERROR
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default')
at pptr://puppeteer_evaluation_script:5:95
at ExecutionContext._ExecutionContext_evaluate (/var/api/Mwsm/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:229:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (/var/api/Mwsm/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16)
at async Client.initialize (/var/api/Mwsm/node_modules/whatsapp-web.js/src/Client.js:339:9)
Expected behavior
Boot normally
Steps to Reproduce the Bug or Issue
crashes after reading qrcode
Relevant Code
const client = new Client({
authStrategy: new LocalAuth({ clientId: 'Bot' }),
puppeteer: { headless: true,
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'
] }
});
Is there an existing issue for this?
Describe the bug
ERROR Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'default') at pptr://puppeteer_evaluation_script:5:95 at ExecutionContext._ExecutionContext_evaluate (/var/api/Mwsm/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:229:15) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ExecutionContext.evaluate (/var/api/Mwsm/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:107:16) at async Client.initialize (/var/api/Mwsm/node_modules/whatsapp-web.js/src/Client.js:339:9)
Expected behavior
Boot normally
Steps to Reproduce the Bug or Issue
crashes after reading qrcode
Relevant Code
const client = new Client({ authStrategy: new LocalAuth({ clientId: 'Bot' }), puppeteer: { headless: true, 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' ] } });
client.initialize();
io.on('connection', function(socket) { client.on('qr', (qr) => { console.log('QR RECEIVED', qr); qrcode.toDataURL(qr, (err, url) => { socket.emit('qr', url); }); });
client.on('ready', () => { console.log('Ready'); });
client.on('authenticated', () => { console.log('Auth'); });
client.on('auth_failure', function() { console.error('Fail'); });
client.on('change_state', state => { console.log('Status: ', state ); });
client.on('disconnected', (reason) => { console.log('Error: ', reason); client.initialize(); }); });
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
No, I am not using Multi Device
Environment
ubuntu 23.04 Android whatsapp-web.js v1.23.1-alpha.5 whatsapp web 2.3000.1012651513 node v20.12.1
Additional context
No response