Issue Description
Instance crash down when I simply try to invoke await chat.sendStateTyping().
error: Uncaught (in promise) r: r
const error = new Error(message);
^
at createEvaluationError (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/utils.js:40:17)
at ExecutionContext.#evaluate (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:391:56)
at async ExecutionContext.evaluate (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:277:16)
at async IsolatedWorld.evaluate (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:16)
at async CdpFrame.evaluate (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:362:20)
at async CdpPage.evaluate (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/puppeteer-core@24.38.0/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:830:20)
at async Client.getChatById (file:///home/ayelsew/Desktop/sideA/node_modules/.deno/whatsapp-web.js@1.34.7/node_modules/whatsapp-web.js/src/Client.js:1694:22)
at async Client.<anonymous> (file:///home/ayelsew/Desktop/sideA/services/agent_whatsapp/main.ts:22:16)
By debugging the stack trace I found the follow:
{
exceptionId: 1,
text: "Uncaught (in promise)",
lineNumber: 0,
columnNumber: 0,
exception: {
type: "object",
className: "r",
description: "r",
objectId: "-1645228502718693245.1.2",
preview: {
type: "object",
description: "r",
overflow: true,
properties: [
{
name: "_e",
type: "object",
value: "Error\n" +
" at j (https://static.whatsapp.net/rsrc.php/v4ikeA4/yJ/l/en_US-j/9HZko7zyvqRgKGqpFRHxNi9lQ…",
subtype: "error"
},
{ name: "name", type: "string", value: "DataError" },
{
name: "message",
type: "string",
value: "Failed to execute 'get' on 'IDBObjectStore': No ke… 'IDBObjectStore': No key or key range specified."
},
{
name: "inner",
type: "object",
value: "DataError: Failed to execute 'get' on 'IDBObjectStore': No key or key range specified.\n" +
" at https…",
subtype: "error"
},
{ name: "type", type: "string", value: "error" }
]
}
}
}
I think it is something related to try to get data from ObjectDB of Chrome. But the chrome I'm using is the one that puppeteer got in the installation process.
Also, after runtime goes down the browser still stays up, so I need to kill it to run the code again.
Reproduction Steps
-
Get the code sample
-
run the code
-
Auth with whatsapp
-
Send a message
Code Sample
import { Client, LocalAuth } from "whatsapp-web.js";
import qrcode from "qrcode-terminal";
const client = new Client({
authStrategy: new LocalAuth(),
puppeteer: {
executablePath: import.meta.dirname + "/browser/chrome",
headless: false,
},
});
client.on("qr", (qr) => {
qrcode.generate(qr, { small: true });
});
client.on("ready", async () => {
console.log(await client.getWWebVersion());
console.log("Client is ready!");
});
client.on("message", async (msg) => {
const chat = await msg.getChat();
await chat.sendStateTyping();
});
client.initialize();
User Setup
| WhatsApp |
Type |
| Account Type |
WhatsApp Business |
| Authentication Strategy |
LocalAuth |
| WhatsApp Web Version |
2.3000.1044071294 |
| whatsapp-web.js Version |
1.34.7 |
| Environment |
Version |
| Browser Type |
Google Chrome |
| Browser Version |
146.0.7680.31 |
| Phone OS Version |
Android 16 |
| Running OS Version |
Garuda Linux |
| Node.js Version |
26.4.0 |
Checklist
Issue Description
Instance crash down when I simply try to invoke
await chat.sendStateTyping().By debugging the stack trace I found the follow:
I think it is something related to try to get data from ObjectDB of Chrome. But the chrome I'm using is the one that puppeteer got in the installation process.
Also, after runtime goes down the browser still stays up, so I need to kill it to run the code again.
Reproduction Steps
Get the code sample
run the code
Auth with whatsapp
Send a message
Code Sample
User Setup
Checklist