-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't forward messages #2435
Comments
I don't think the problem is in forwarding messages, looks like a problem accessing the Puppeteer instance. Take a look at this PR, make sure you implement this fix and see if your problem will be solved. #2434 |
Not solved.... |
for me it worked:
|
Media forwarding stopped working UPD: Adding one second delay for sending photos solved the problem, apparently Whatsapp does not have time to process photos (With other types of files everything works without delay) |
however, when I try to forward it through the GroupChat.lastMessage attribute, the same error returns 😥😔 |
this works for me! the only part i needed to change was |
Is there an existing issue for this?
Describe the bug
After whatsapp update I can't forward messages
Expected behavior
forwad message
Steps to Reproduce the Bug or Issue
1- conection
2- get message
3 - forward message
4 - errror
TypeError: Cannot read properties of undefined (reading 'pupPage')
at Message.forward (C:\Users\Lucas\Documents\teste\node_modules\whatsapp-web.js\src\structures\Message.
js:387:27)
at Client. (C:\Users\Lucas\Documents\teste\app.js:21:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Relevant Code
const { Client, LocalAuth } = require("whatsapp-web.js");
const qrcode = require("qrcode-terminal");
const client = new Client({
puppeteer: {
headless: false,
},
authStrategy: new LocalAuth({ clientId: "test" }),
});
client.on("qr", (qr) => {
qrcode.generate(qr, { small: true });
});
client.on("ready", async () => {
try {
console.log("Conexão feita! Valeu boy.");
const userGroups = await client.getChats();
const groupsPechin = userGroups.filter((chat) => chat.name === "Envios");
const message = groupsPechin[0].lastMessage;
await message.forward(chatId);
} catch (err) {
console.log(err);
}
});
client.initialize();
Browser Type
Google Chrome
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
whatsapp-web.js
Additional context
No response
The text was updated successfully, but these errors were encountered: