After reading the QR Code, the whatsapp application does not open, even restarting the phone.
Are you referring to the WhatsApp application on the phone itself? What exactly happens when you try and open it?
After the QR is linked, it closes on its own. And when trying to open the application it closes.
I tested with HUAWEi, SAMSUNG E5, MOTO G5, LG K10, and using whatsapp bussiness and common.
When I disconnect the session and end the program in node.js the whatsapp application runs normally
This happened after the last update 1.6.1
i face the same issue, run npm update and it working again
It was done, but the error persists.
"whatsapp-web.js": "^ 1.6.1"
"puppeteer": "^ 3.1.0",
I found the problem and solution.
The registered numbers had the + character at the beginning of the phone number.
When the whatsapp app sued it crashed.
To correct just filter the number before sending.
let phone = num.replace (/ [^ \ d] / g, "")
client.sendMessage ($ {phone} @ c.us, message);
Tnx
Great! Glad it's solved :)
Most helpful comment
I found the problem and solution.
The registered numbers had the + character at the beginning of the phone number.
When the whatsapp app sued it crashed.
To correct just filter the number before sending.
let phone = num.replace (/ [^ \ d] / g, "")
client.sendMessage (
$ {phone} @ c.us, message);Tnx