whatsapp-web.js: QR code doesn't appear with LocalAauth, with NoAuth appears instantly
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Getting this error after running below test code:
(node:20828) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector `[data-testid="intro-md-beta-logo-dark"], [data-testid="intro-md-beta-logo-light"], [data-asset-intro-image-light="true"], [data-asset-intro-image-dark="true"]` failed: timeout 60000ms exceeded
Now if I remove line with authStrategy (so NoAuth becomes default), there is no error and QR appears within 2 seconds.
Disk write is allowed, LocalAuth created new dir .wwebjs_auth/session full of files. I need LocalAuth for Multi Device.
Expected behavior
QR code should appear with LocalAuth same as NoAuth.
Steps to Reproduce the Bug or Issue
- Run example code
- QR does not appear with LocalAuth (timout), but appears with NoAuth
Relevant Code
const qrcode = require('qrcode-terminal');
const { Client, LocalAuth } = require('whatsapp-web.js');
const client = new Client({
authStrategy: new LocalAuth(),
authTimeoutMs: 60000,
puppeteer: {args: ['--no-sandbox'],}
});
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
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
whatsapp-web.js 1.19.3 Ubuntu 20.04.4 LTS Node.js v14.20.0
Additional context
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18
you can install it as an npm package and then follow here on how to setup RemoteAuth It should look sth like this. I think you also have to set an environment variable
EFS_PATHwhich should point to the mounting point of your EFS driveI managed to get it to work by using RemoteAuth with https://github.com/fabiomello/wwebjs-efs