Closed krismandev closed 7 months ago
const client = new Client({
authStrategy: new LocalAuth(),
puppeteer: {
args: ['--no-sandbox'],
}
});
client.on('ready', async () => {
client.pupPage.on('error', (event) => {
client.destroy();
client.initialize();
});
});
Can we used this code to detect if whatsapp number banned ? I need read the event if wa number is banned .
Is there any more you can provide? The OPENING state is when the page goes to the loading screen, I don't think what is happening is normal behavior within WhatsApp Web
const client = new Client({ authStrategy: new LocalAuth(), puppeteer: { args: ['--no-sandbox'], } }); client.on('ready', async () => { client.pupPage.on('error', (event) => { client.destroy(); client.initialize(); }); });
that was a good temporary solution but my instance has more than 5k chats and take more than 4 minutes to complete the initialize
Is there an existing issue for this?
Describe the bug
whatsapp stops receiving messages when state changes to OPENING then CONNECTED.
even though the status is connected, whatsapp still can't send and receive messages until we reconnect.
it always happens when change_state event is raised and the state shows OPENING.
the state changes to OPENING at an unpredictable time.
Expected behavior
The expected behavior is whatsapp will still be able to receive messages even though the state changes to OPENING and CONNECTED again without do reconnect
Steps to Reproduce the Bug or Issue
I'm not able to reproduce the bug.
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
Linux whatsapp-web.js 1.17.1 version
Additional context
No response