LocalAuth does not work for saving sessions, but login works without LocalAuth
/path/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 'default')
at puppeteer_evaluation_script:14:123
at ExecutionContext._evaluateInternal (/path/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (/path/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
at async Client.initialize (/path/node_modules/whatsapp-web.js/src/Client.js:267:9)
Node.js v18.11.0
Expected behavior
As a user, I expected client to login and save the session, but it throws error after scanning QR Code.
Steps to Reproduce the Bug or Issue
Use LocalAuth
Scan QR Code
Relevant Code
const qrcode = require('qrcode-terminal');
const { Client, LocalAuth} = require('whatsapp-web.js');
const client = new Client({
authStrategy: new LocalAuth()
});
client.on('qr', qr => {
qrcode.generate(qr, {small: true});
});
client.on('ready', () => {
console.log('Client is ready!');
});
client.initialize();
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Arch Linux with 6.0.2-arch1-1
Phone OS: Android 10
whatsapp-web.js version: latest installed by npm
node.js version 18.11.0
Is there an existing issue for this?
Describe the bug
LocalAuth does not work for saving sessions, but login works without LocalAuth
Expected behavior
As a user, I expected client to login and save the session, but it throws error after scanning QR Code.
Steps to Reproduce the Bug or Issue
Relevant Code
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Arch Linux with 6.0.2-arch1-1 Phone OS: Android 10 whatsapp-web.js version: latest installed by npm node.js version 18.11.0
Additional context
LocalAuth worked once then stopped working