pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.54k stars 3.7k forks source link

Not Listening Personal Chat #1552

Closed LuckyArdhika closed 2 years ago

LuckyArdhika commented 2 years ago

Is there an existing issue for this?

Describe the bug

on message didnt listing personal chat

Expected behavior

i expected listening both group and personal message, but the code just listening for group message.

client.on('message', async message => {
  console.log(message.from);
})

even though yesterday with the same code still running normally.

Steps to Reproduce the Bug or Issue

  1. is someone same with me? maybe bcs whatsapp update their api.
  2. I found the bug, its because im using LocalAuth. idk why but after some times restart using LocalAuth, bot didnt listening for personal message.

Relevant Code

No response

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows Phone OS: Android whatsapp-web.js version 1.17.0 Node.js Version 16.15.0

Additional context

No response

PurpShell commented 2 years ago

you might have corrupted the database, clear the session and start over