pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
14.95k stars 3.55k forks source link

w-version 2.2335.6 client.on('ready') not triggers: INTRO_IMG_SELECTOR not working (solved) #2427

Closed Julzk closed 8 months ago

Julzk commented 1 year ago

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

Julzk commented 1 year ago

solution: add "[data-icon="intro-md-beta-logo-dark"], [data-icon="intro-md-beta-logo-light"]" to INTRO_IMG_SELECTOR

vinibgoulart commented 1 year ago

where can i add it into INTRO_IMG_SELECTOR?

vinibgoulart commented 1 year ago

https://github.com/pedroslopez/whatsapp-web.js/issues/2422#issuecomment-1687391584

Julzk commented 1 year ago

temporarily use this in your package json image "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7"

eduNsantos commented 1 year ago

I tested and it works!

mansoorulhaq commented 1 year ago

it works first time. but after application restart it shows again QR code rather than loading authenticated session

Todpig commented 1 year ago

here it worked, however the method of forwarding messages does not work in all my sessions :(

jessepaniza commented 1 year ago

use isso temporariamente em seu pacote json "whatsapp-web.js": " https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7 " imagem

Aqui funcionou porem quando fecha e reabre ele perde a sessão

Todpig commented 1 year ago

@Julzk, can you forward messages normally using this package?

vinibgoulart commented 1 year ago

here its working

Todpig commented 1 year ago

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)

vinibgoulart commented 1 year ago

solved in https://github.com/pedroslopez/whatsapp-web.js/pull/2434

Todpig commented 1 year ago

resolvend in #2434

not work to me

Todpig commented 1 year ago

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);
}
NoahLawu commented 1 year ago

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 ?

justoverclockl commented 12 months ago

i have the same problem with latest version, client ready is not triggered....so i can't login to my session

ricardor1267 commented 11 months ago

any solution?

utkarsh-42 commented 10 months ago

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 "