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

qr does not connect, it could be that whatsapp blocked the qr #629

Open
CharlySoftCO opened this issue Apr 4, 2024 · 18 comments
Open

qr does not connect, it could be that whatsapp blocked the qr #629

CharlySoftCO opened this issue Apr 4, 2024 · 18 comments

Comments

@CharlySoftCO
Copy link

Good morning colleagues, yesterday I started to experience a connection problem with my QR codes in several systems that I have deployed.
2024-04-04 06 44 33

@Gecko2087
Copy link

Good morning. I'm having the same problem since yesterday. Can someone help us with the solution? I saw that the WhatsApp Web JS library was not updated again.

@fabiodevn1
Copy link

Segue a solução

Remova o whatsappweb
npm uninstall whatsapp-web.js

Instale a versão corrigida
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

@Gecko2087
Copy link

Gecko2087 commented Apr 4, 2024

Segue a solução

Remova o whatsappweb npm uninstall whatsapp-web.js

Instale a versão corrigida npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Thank you so much! I had just found the same solution elsewhere.
I just tried it and it works.

In my case I had to add the following to make it work.

npm uninstall whatsapp-web.js
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus
npm install
pm2 restart all

@smorigo
Copy link

smorigo commented Apr 7, 2024

Pessoal fiz a instalação, faço a leitura do QRCode, olhei no log do browser e reparei que estou recebendo esse erro:

image

Essa maquina está rodando na AWS, alguém tem alguma idea do que pode ser ?

@Flag-King
Copy link

Flag-King commented Apr 8, 2024

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Aqui estou tendo o mesmo erro, porém esta solução aparentemente não funcionou ou eu não captei o que precisa fazer [rs].
Este comando roda no diretório raiz do Whaticket? Ou no Back / Frontend?

Nossa, viajei. Desculpe. É na pasta dele mesmo, né?
Já procurei tanto a solução que estou meio maluco, já. Vou refazer e volto comentar os resultados.

Agora sim tudo OK! Tive uns momentos de instabilidade na página de conexões, porém depois funcionou.
Faltava a dica do amigo Gecko2087.

Thanks, man!

@Gecko2087
Copy link

Hello people. Now I'm having trouble adding a connection. It stays charging and doesn't show me to scan the QR code. Does anyone know how to solve it?

image

@rubensflinco
Copy link

Segue a solução

Remova o whatsappweb npm uninstall whatsapp-web.js

Instale a versão corrigida npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Mesmo eu faço esses passo ainda continuo tendo problemas, segue um print do erro que encontro no terminal do servidor apos escanear o QRCode:
image

Alguem pode me ajudar?

@LucasCCS
Copy link

Segue a solução
Remova o whatsappweb npm uninstall whatsapp-web.js
Instale a versão corrigida npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Mesmo eu faço esses passo ainda continuo tendo problemas, segue um print do erro que encontro no terminal do servidor apos escanear o QRCode: image

Alguem pode me ajudar?

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Siga estes passos:

npm uninstall whatsapp-web.js
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

Edite o arquivo src/libs/wbot.ts e acrescente no client:
`const wwebVersion = '2.2407.3';

webVersionCache: {
type: 'remote',
remotePath: https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html,
},
`

Deve ficar assim:
` const wwebVersion = '2.2407.3';

  const wbot: Session = new Client({
    session: sessionCfg,
    authStrategy: new LocalAuth({clientId: 'bd_'+whatsapp.id}),
    puppeteer: {
      executablePath: process.env.CHROME_BIN || undefined,
      // @ts-ignore
      browserWSEndpoint: process.env.CHROME_WS || undefined,
      args: args.split(' ')
    },
    webVersionCache: {
      type: 'remote',
      remotePath: `https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html`,
    },
  });`

@edilsonlsouza
Copy link

Olá! Durante toda a noite pesquisei sobre o erro e cada um tem uma gambiarra para colocar para funcionar, nessa nova versão não tem nada que faça funcionar. Isso deveria ser corrigido na fonte.

@lidernetworktecnologia
Copy link

mesma coisa aqui e ja tentei outras soluçoes sem sucesso...

@lidernetworktecnologia
Copy link

lidernetworktecnologia commented Apr 18, 2024

A dica do @LucasCCS deu certo para mim, porem para que funcione nao usei o npm install, alterei diretamente o arquivo package.json com a versao correta ficando: "whatsapp-web.js": "^1.23.1-alpha.5"
depois removi o diretorio node_modules e fiz o install, apos isso alterei o arquivo src/libs/wbot.ts conforme abaixo:

const wwebVersion = '2.2407.3';
const wbot: Session = new Client({
session: sessionCfg,
authStrategy: new LocalAuth({clientId: 'bd_'+whatsapp.id}),
puppeteer: {
executablePath: process.env.CHROME_BIN || undefined,
// @ts-ignore
browserWSEndpoint: process.env.CHROME_WS || undefined,
args: args.split(' ')
},
webVersionCache: {
type: 'remote',
remotePath: https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwebVersion}.html,
},
});

Enjoy!

@thigas88
Copy link

thigas88 commented May 1, 2024

npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

@lidernetworktecnologia mesmo seguindo a dica do @LucasCCS e a sua adaptação ainda continuo tendo erros para registrar o número. Estou rodando em ambiente local em docker

2024-05-01 13:08:52 [1714579732709] ERROR: {"name":"JsonWebTokenError","message":"jwt malformed"}
2024-05-01 13:09:03 [1714579743010] INFO: Client Connected
2024-05-01 13:09:03 [1714579743077] INFO: Client Connected
2024-05-01 13:09:03 [1714579743086] INFO: Client Connected
2024-05-01 13:09:03 [1714579743273] INFO: Client Connected
2024-05-01 13:09:03 [1714579743276] INFO: Client Connected
2024-05-01 13:09:03 [1714579743276] INFO: A client joined to pending tickets channel.
2024-05-01 13:09:03 [1714579743277] INFO: Client Connected
2024-05-01 13:09:03 [1714579743278] INFO: A client joined to open tickets channel.
2024-05-01 13:09:03 [1714579743280] INFO: A client joined notification channel
2024-05-01 13:09:07 [1714579747348] INFO: Client disconnected
2024-05-01 13:09:07 [1714579747349] INFO: Client disconnected
2024-05-01 13:09:11 [1714579751074] INFO: Client Connected
2024-05-01 13:09:33 [1714579773390] INFO: Client disconnected
2024-05-01 13:09:49 (node:37) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null
2024-05-01 13:09:49     at LocalWebCache.persist (/usr/src/app/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69)
2024-05-01 13:09:49     at /usr/src/app/node_modules/whatsapp-web.js/src/Client.js:744:36
2024-05-01 13:09:49     at runMicrotasks (<anonymous>)
2024-05-01 13:09:49     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2024-05-01 13:09:49 (node:37) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 14)

Tentativa 1

  • apaguei a pasta node_modules
  • atualizei o package.json: "whatsapp-web.js": "^1.23.1-alpha.5"
  • npm install && npm run build

Tentativa 2

  • apaguei a pasta node_modules
  • atualizei o package.json: "whatsapp-web.js": "github:pedroslopez/whatsapp-web.js#webpack-exodus"
  • npm install && npm run build

Em ambas as tentativas alterei o arquivo src/libs/wbot.ts.

Alguma outra ação para essa questão?

@lidernetworktecnologia
Copy link

@thigas88 mostra como esta seu arquivo wbot.ts?

@emanuelserpa
Copy link

Também estou fazendo o processo e nada funciona. :(

image

@lidernetworktecnologia
Copy link

lidernetworktecnologia commented May 16, 2024

Agora caiu denovo hoje e nao voltou mais mesmo com essas correçoes, esta dificil manter o Whaticket de uns tempos porque depende de outros packages de terceiros e esses nao sao realizadas as devidas manutenções em tempo habil...

@rogeriosims
Copy link

Estou com mesmo problema.

@rogeriosims
Copy link

funcionou para mim
pm2 stop all
npm remove github:pedroslopez/whatsapp-web.js
npm install github:pedroslopez/whatsapp-web.js#webpack-exodus

/home/rogerio/whaticket/backend/src/libs/wbot.ts

  const args:String = process.env.CHROME_ARGS || "";	  
  const wwwebVersion = '2.2407.3';

  const wbot: Session = new Client({
    session: sessionCfg,
    authStrategy: new LocalAuth({clientId: 'bd_'+whatsapp.id}),
    puppeteer: {
	  headless: true , 
	  args: [
        '--no-sandbox',
        '--disable-setuid-sandbox',
		],
      executablePath: process.env.CHROME_BIN || undefined,
      // @ts-ignore
      browserWSEndpoint: process.env.CHROME_WS || undefined,
    },
	webVersionCache: {
	type: 'remote',
	remotePath: "https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/${wwwebVersion}.html",
	},		
  });

@lidernetworktecnologia
Copy link

Deu certo aqui tambem com esta correçao, muito obrigado!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests