Issue Description
After recent WhatsApp Web updates, client.sendMessage() intermittently returns a valid message object and serialized ID, but the message is not successfully delivered.
The failure has been reproduced both with a minimal probe and with the regular application:
- A freshly linked
LocalAuth session initially sends messages normally.
- Successful messages receive ACK 1, followed by ACK 2/3.
- After some time,
sendMessage() still resolves and returns a valid message ID.
- No
message_ack event is received for that ID, including ACK 1.
- The affected message appears as "Waiting for this message. This may take a while."
client.getState() may still report CONNECTED.
- The session later becomes invalid and WhatsApp Web navigates to:
https://web.whatsapp.com/?post_logout=1
Relinking the session from scratch only resolves the problem temporarily.
This is not merely an application-side SEND-OK interpretation: the application now treats the return from sendMessage() only as SEND-RETURNED and waits up to 60 seconds for ACK 1. The failed messages never receive it.
Relevant Log Sequence
[SEND-TRY] state=CONNECTED
[SEND-RETURNED] msgId=<valid serialized ID>; waiting for ACK 1
[STATE] CONNECTED
[SEND-UNVERIFIED] sendMessage returned <same ID>, but ACK 1 was not received within 60000ms
Immediately preceding messages in the same session received ACK 1, 2 and 3 normally.
During the subsequent restart, the captured page diagnostics showed:
{
"url": "https://web.whatsapp.com/?post_logout=1",
"readyState": "loading"
}
Puppeteer then reported Execution context was destroyed while WhatsApp Web was navigating. This appears to be a consequence of the logout/navigation, rather than the initial sending failure.
Steps To Reproduce
- Create a client using
LocalAuth.
- Link a fresh session using QR.
- Send periodic text messages to a dedicated test group.
- Record the returned message ID and all
message_ack events.
- Initially, messages receive ACK 1/2/3.
- Eventually,
sendMessage() may return a valid ID without any ACK.
- Check the affected message on linked devices.
- Continue monitoring the page/session; it may redirect to
?post_logout=1.
The failure is intermittent and may require several hours.
Code Sample
const { Client, LocalAuth } = require('whatsapp-web.js');
const client = new Client({
authStrategy: new LocalAuth({ clientId: 'ack-test' })
});
const groupId = 'REPLACE_WITH_TEST_GROUP_ID@g.us';
client.on('ready', async () => {
console.log('WhatsApp Web version:', await client.getWWebVersion());
const sendProbe = async () => {
const message = await client.sendMessage(
groupId,
`ACK test ${new Date().toISOString()}`
);
console.log('SEND-RETURNED:', message.id._serialized);
};
await sendProbe();
setInterval(sendProbe, 15 * 60 * 1000);
});
client.on('message_ack', (message, ack) => {
console.log('ACK:', ack, 'ID:', message.id._serialized);
});
client.on('disconnected', reason => {
console.log('DISCONNECTED:', reason);
});
client.initialize();
Environment
- Account type: Standard
- Authentication: LocalAuth
- whatsapp-web.js: 1.34.7
- WhatsApp Web version observed: 2.3000.1043332421
- Browser: Chromium 146.0.7680.31
- Node.js: 20.19.5
- OS: Ubuntu 22.04.5 LTS
- Primary phone: Android 14
- Primary phone WhatsApp: 2.26.27.85
The installed package is npm release 1.34.7 with a local patch-package equivalent of PR #201848 for the $1 serialized-ID compatibility change. The earlier PR #201832 fork is no longer installed.
The $1 patch fixes the previous r: r exception, but it does not prevent this missing-ACK / waiting-message / logout sequence.
Additional Isolation
The same missing-ACK behavior occurred in a minimal probe without Firestore event processing.
During application testing, these operations were also disabled:
getChats()
getChatById()
msg.getChat()
sendSeen()
- Chat synchronization
Therefore, the failure is not dependent on those operations.
Possibly Related
Issue #201770 reports the same unexpected LOGOUT navigation to
?post_logout=1 using whatsapp-web.js 1.34.7 and Chromium 146.
The present report adds a preceding observable failure: sendMessage()
returns a valid ID, but ACK 1 stops arriving before the session is logged out.
Issue Description
After recent WhatsApp Web updates,
client.sendMessage()intermittently returns a valid message object and serialized ID, but the message is not successfully delivered.The failure has been reproduced both with a minimal probe and with the regular application:
LocalAuthsession initially sends messages normally.sendMessage()still resolves and returns a valid message ID.message_ackevent is received for that ID, including ACK 1.client.getState()may still reportCONNECTED.https://web.whatsapp.com/?post_logout=1Relinking the session from scratch only resolves the problem temporarily.
This is not merely an application-side
SEND-OKinterpretation: the application now treats the return fromsendMessage()only asSEND-RETURNEDand waits up to 60 seconds for ACK 1. The failed messages never receive it.Relevant Log Sequence
Immediately preceding messages in the same session received ACK 1, 2 and 3 normally.
During the subsequent restart, the captured page diagnostics showed:
{ "url": "https://web.whatsapp.com/?post_logout=1", "readyState": "loading" }Puppeteer then reported
Execution context was destroyedwhile WhatsApp Web was navigating. This appears to be a consequence of the logout/navigation, rather than the initial sending failure.Steps To Reproduce
LocalAuth.message_ackevents.sendMessage()may return a valid ID without any ACK.?post_logout=1.The failure is intermittent and may require several hours.
Code Sample
Environment
The installed package is npm release
1.34.7with a localpatch-packageequivalent of PR #201848 for the$1serialized-ID compatibility change. The earlier PR #201832 fork is no longer installed.The
$1patch fixes the previousr: rexception, but it does not prevent this missing-ACK / waiting-message / logout sequence.Additional Isolation
The same missing-ACK behavior occurred in a minimal probe without Firestore event processing.
During application testing, these operations were also disabled:
getChats()getChatById()msg.getChat()sendSeen()Therefore, the failure is not dependent on those operations.
Possibly Related
Issue #201770 reports the same unexpected
LOGOUTnavigation to?post_logout=1using whatsapp-web.js 1.34.7 and Chromium 146.The present report adds a preceding observable failure:
sendMessage()returns a valid ID, but ACK 1 stops arriving before the session is logged out.