#problem on client.initialize()

6 messages · Page 1 of 1 (latest)

woven root
#

Hello, I'm trying to access the lib through client.initialize(), at first I didn't receive any response, I set headless to false and saw that it just opens chromium on a white screen and nothing happens.
using puppeteer and asking it to access the whatsapp page manually it works and loads the page.
Does anyone know why client.initialize() isn't working?

vapid wadi
#

it's works fine. just use the example from the documentation

#

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();

woven root
#

With this code you sent, the website in the chromium search bar looks like about:blank

#

@vapid wadi

glossy pasture
#
    puppeteer: {
        executablePath: 'path/to/chromium',
    },
    ...
});```
Did you try to define the puppeter path?