Skip to content
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

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

Closed
1 task done
Julzk opened this issue Aug 22, 2023 · 18 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@Julzk
Copy link

Julzk commented Aug 22, 2023

Is there an existing issue for this?

  • I have searched the existing issues

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 Julzk added the bug Something isn't working label Aug 22, 2023
@Julzk
Copy link
Author

Julzk commented Aug 22, 2023

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

@vinibgoulart
Copy link

where can i add it into INTRO_IMG_SELECTOR?

@vinibgoulart
Copy link

#2422 (comment)

@Julzk
Copy link
Author

Julzk commented Aug 22, 2023

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

@eduNsantos
Copy link

I tested and it works!

@mansoorulhaq
Copy link

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

@Todpig
Copy link

Todpig commented Aug 22, 2023

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

@jessepaniza
Copy link

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
Copy link

Todpig commented Aug 23, 2023

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

@vinibgoulart
Copy link

here its working

@Todpig
Copy link

Todpig commented Aug 24, 2023

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
Copy link

vinibgoulart commented Aug 24, 2023

solved in #2434

@Todpig
Copy link

Todpig commented Aug 24, 2023

resolvend in #2434

not work to me

@Todpig
Copy link

Todpig commented Aug 24, 2023

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
Copy link

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
Copy link

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

@ricardor1267
Copy link

any solution?

@utkarsh-42
Copy link

use this solution by #2427 (comment)
he has given this hotfix
"whatsapp-web.js": " https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_7 "

@alechkos alechkos closed this as completed Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests