-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
On 'ready' is not fired #2458
Comments
Just tested the same script with the same version (1.22.1) on macOS - the same result. I've also tried the 1.22.2-alpha.0 - this version works fine! So I'll stay on the alpha for now. |
same here with latest version
El mar, 29 ago 2023 a la(s) 13:21, TheMacros ***@***.***)
escribió:
… Just tested the same script with the same version (1.22.1) on macOS - the
same result.
If I run it with *puppeteer.headless = false* on macOS - I see that the
authorization process is working in Chromium (so in the Chromium browser I
see my account authorized), but still nothing I can see in the script
output.
I've also tried the 1.22.2-alpha.0 - this version works fine! So I'll stay
on the alpha for now.
But the question is how the 1.22.1 is working on my other project.
—
Reply to this email directly, view it on GitHub
<#2458 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOQBBZJSBX6WN5YXQ3UP7DTXXYJJXANCNFSM6AAAAAA4DESGSE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Fernando Wermus.
Los contenidos de este mensaje, y los archivos adjuntos, son de carácter
confidencial. Si ud. no es el legitimo destinatario de este mensaje, avise
inmediatamente al remitente y borre este mensaje. Cualquier distribución o
divulgación no autorizada de este mensaje y sus archivos asociados está
prohibida. Por favor infórmenos inmediatamente y destruya el original o
cualquier impresión del mismo.
Important Note:
This e-mail (including any attachments) is confidential and intended only
for the use of the addressee (s) named herein. If you have received this
e-mail in error, you are hereby notified that any review, copying or
distribution of it is strictly prohibited. Please inform us immediately and
destroy the original e-mail and any printouts.
|
same here. version 1.22.1 |
Did changing this file fix the problem for you? It worked for me: fix |
same here i think my vps is broken but not :v |
same here. I tried on Linux (WSL) using docker and localhost, worked fine. But on production (azure) somehow it's not working 1.22.1 version. And it started happing just before updating from stable 1.21.0 version |
Same here on chrome. |
I have the same problem, using ubuntu 18, it stopped working completely |
Me too, the same behavior here, when expecting the ready event to be fired |
1.22.2-alpha.0 works fine |
same error |
thanks man! this really fixes the issue! |
Pra mim não rolou não :'( |
same here, it solved when i changed to 1.22.2-alpha.0 |
Como que muda? |
tbm quero saber como muda |
|
Also @ItzFerr I got this error when switching to the alpha |
Replace in src/Client.js const INTRO_IMG_SELECTOR = '[data-testid="intro-md-beta-logo-dark"], [data-testid="intro-md-beta-logo-light"], [data-asset-intro-image-light="true"], [data-asset-intro-image-dark="true"]'; to const INTRO_IMG_SELECTOR = "[data-icon='chat']" |
Altere o arquivo package.json, alterando a versão do whatsapp web. Depois, rode o comando npm install |
npm i whatsapp-web.js@1.22.2-alpha.0 --save |
I updated to version whatsapp-web.js@1.22.2-alpha.0 I changed the code : const INTRO_IMG_SELECTOR = '[data-testid="intro-md-beta-logo-dark"], [data-testid="intro-md-beta-logo-light"], [data-asset-intro-image-light ="true"], [data-asset-intro-image-dark="true"]'; for const INTRO_IMG_SELECTOR = '[data-icon='chat']'; It still didn't work, and now the QR code doesn't even appear for me to scan with my cell phone. does anyone have any suggestions? I'll keep looking to see if I find a solution. |
same here |
Alright, in issue #2439 I found a comment from @joulgs about uninstalling whatsapp-web.js npm unistall whatsapp-web.js -S and then add it to the package.json file in the dependencies "whatsapp-web.js": "https://github.com/Julzk/whatsapp-web.js/tarball/jkr_hotfix_8" After changing just run the code npm install the client came back, it shows that whatsapp was connected but it gives an error Error: Evaluation failed: Error: wid error: invalid wid /workspaces/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221 does anyone have any suggestions? I will keep looking for a solution. |
I don't know what could have happened but apparently the authenticator was causing some conflict. With me I used the following code for authentication : const { Client, LocalAuth } = require('whatsapp-web.js'); I changed to : const { Client } = require('whatsapp-web.js'); Now it's working perfectly, I don't know what could have caused the bug that was happening to me but when I removed the authenticator it started working normally again, all messages are being sent and the bot responds perfectly. |
Aqui resolveu, alterei dessa forma e alterei também o package pra Alpha.. Obrigado!! |
i still havent found the solution for this, i have try to change the script in Client.js and still the client ready doesnt show up. I have updated the package to whatsapp-web.js 1.22.2-alpha.0 and still doesnt worked. Any other solution? |
1 similar comment
i still havent found the solution for this, i have try to change the script in Client.js and still the client ready doesnt show up. I have updated the package to whatsapp-web.js 1.22.2-alpha.0 and still doesnt worked. Any other solution? |
You should either implement the fix the guys found out on this issue or wait for the release of a new patch version. For instance, I will leave here my repo with the corresponding bugfix (working) in case any other want it until stable release come out: https://github.com/neckell/whatsapp-web.js
|
This fix worked for me #2485 |
mine too |
The error is still happening, the new fix is: On the Client.js file from the Package |
@fpiantoni did you check on the repo i quoted? I am not quite sure about |
@neckell let me check it. I just found that in another reponse, tested it and worked. Let me pull your package and test it. |
I added a new state "Synced" that's fired when a syncronization between mobile phone and instance is complete. It's not official, it's up for my needs |
This works for me, just updated the package version, this is my sample code: const qrcode = require('qrcode-terminal');
const { Client, LocalAuth } = require('whatsapp-web.js');
const client = new Client({
puppeteer: {
args: ['--no-sandbox', '--disable-setuid-sandbox'],
},
});
client.on('qr', (qr) => {
qrcode.generate(qr, { small: true });
});
client.on('ready', () => {
console.log('Client is ready!');
});
client.on('disconnected', () => {
console.log('Client is disconnected!');
});
client.on('authenticated', () => {
console.log('Client is authenticated!');
});
client.on('auth_failure', () => {
console.log('Client is auth_failure!');
});
client.on('message', (msg) => {
if (msg.body == '!ping') {
msg.reply('pong');
}
});
client.initialize(); |
@alechkos which is the commit of this fix? |
npm i github:pedroslopez/whatsapp-web.js#main |
@alechkos yes, but I can't find how this has been fixed on the repo. |
Is there an existing issue for this?
Describe the bug
I'm trying to create a very basic app that handles incoming messages from WhatsApp.
The code generates a QR code successfully, but when I scan it with WhatsApp (link device) with an iOS or Android app nothing happens.
The QR code is scanned successfully and the linked device (browser) appears on my mobile device.
However, in the console, I didn't receive 'Client is ready!' message or any other message (like 'Client is authenticated!' or 'Client is auth_failure!') - absolutely nothing. When I disconnect the device I also don't receive the message 'Client is disconnected!'.
Also, I have no exceptions.
Expected behavior
I'm expecting the on('ready') should fire when I scan the QR code and on('disconnected') should be fired when device is removed
Steps to Reproduce the Bug or Issue
There are no steps to reproduce.
Relevant Code
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS: Ubuntu Linux 18.04
Phone: iOS or Android
whatsapp-web.js: 1.22.1
WhatsApp Web version: 2.2335.9
Node: 16.15.1
Additional context
I have another app (that uses whatsapp-web) running on the same server. It works fine.
The text was updated successfully, but these errors were encountered: