Closed Julzk closed 8 months ago
solution: add "[data-icon="intro-md-beta-logo-dark"], [data-icon="intro-md-beta-logo-light"]" to INTRO_IMG_SELECTOR
where can i add it into INTRO_IMG_SELECTOR?
temporarily use this in your package json
"whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7"
I tested and it works!
it works first time. but after application restart it shows again QR code rather than loading authenticated session
here it worked, however the method of forwarding messages does not work in all my sessions :(
use isso temporariamente em seu pacote json "whatsapp-web.js": " https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7 "
Aqui funcionou porem quando fecha e reabre ele perde a sessão
@Julzk, can you forward messages normally using this package?
here its working
using this package, I have the following error when trying to forward the messages: 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 () => { console.log("Conexão feita!"); const userGroups = await client.getChats(); const groupEnvios = userGroups.find((chat) => chat.name === "name1"); const groupPechinchou = userGroups.find( (chat) => chat.name === "name2" );
const message = groupEnvios.lastMessage; console.log(message); message.forward(groupPechinchou.id._serialized); });
client.initialize();
C:\Users\Lucas\Documents\testeForward\node_modules\whatsapp-web.js\src\structures\Message.js:385 await this.client.pupPage.evaluate(async (msgId, chatId) => { ^
TypeError: Cannot read properties of undefined (reading 'pupPage') at Message.forward (C:\Users\Lucas\Documents\testeForward\node_modules\whatsapp-web.js\src\structures\Message.js:385:27) at Client. (C:\Users\Lucas\Documents\testeForward\app.js:25:11) at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
resolvend in #2434
not work to me
for me it worked: whatsapp-web.js/src/structures/Message.js : 387 async forward(chat) { const chatId = typeof chat === 'string' ? chat : chat.id._serialized;
await this.client.pupPage.evaluate(async (msgId, chatId) => {
let msg = window.Store.Msg.get(msgId);
let chat = window.Store.Chat.get(chatId);
window.Store.Chat.forwardMessagesToChats([msg],[chat]);
}, this.id._serialized, chatId);
}
client.on('ready') not triggred when i scan the QR code, my code is below: client.on('ready', () => { console.log('Client is ready!'); }); So, after scan QR Code, the bot not show up on chat list, anyone know this solution ?
i have the same problem with latest version, client ready is not triggered....so i can't login to my session
any solution?
use this solution by https://github.com/pedroslopez/whatsapp-web.js/issues/2427#issuecomment-1688082588 he has given this hotfix "whatsapp-web.js": " https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7 "
Is there an existing issue for this?
Describe the bug
solution: add "[data-icon="intro-md-beta-logo-dark"], [data-icon="intro-md-beta-logo-light"]" to INTRO_IMG_SELECTOR
Expected behavior
client.on('ready') trigger
Steps to Reproduce the Bug or Issue
wait for ready
Relevant Code
No response
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
Linux whatsapp web version 2.2335.6
Additional context
No response