whatsapp-web.js: error when scanning qrcode

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

D:\Projetos\sizezap srv\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34 const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];

^

TypeError: Cannot read properties of null (reading ‘1’) at LocalWebCache.persist (D:\Projetos\sizezap srv\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34:69) at D:\Projetos\sizezap srv\node_modules\whatsapp-web.js\src\Client.js:757:36 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Expected behavior

he expected would be to start the client normally

Steps to Reproduce the Bug or Issue

just start the client

Relevant Code

const client = new Client({ authStrategy: new LocalAuth({ dataPath: sessoes\\${chave}_${id}
})
});

client.initialize();

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Windows Phone OS: Android whatsapp-web.js version: 1.23.0 WhatsApp Web version: the most recent Node.js Version : 20.11.1

Additional context

imagem_2024-04-02_161449812

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Reactions: 1
  • Comments: 15

Most upvoted comments

Você experimentará, provavelmente só tenha uma resposta amanhã, visto que o serviço fica em funcionamento por várias horas e depois para gerar o erro.

Acho que o erro é devido a alguma atualização do WhatsApp Web

Sim, foi isso mesmo. O cliente relatou essa atualização no dia seguinte quando parou o serviço. Mas até então não há nenhuma forma oficial de resolver certo? Tentei mandar um ticket mas o moderador fechou! Esse problema ocorreu em 2020 e houve soluções parciais para resolver, isso naquele ano, a mesma solução pra agora não funciona. Vou torcer para que essa que você me passou funcione. Desde já obrigado

acho que estão resolvendo, até porque como essa API não é oficial, não temos muito o que fazer kkk mas fico feliz em ajudar 😄

possible solution, it worked for me 1 - Go to “whatsapp-web.js/util/Constants.js” 2 - where is

webVersionCache: {
        type: 'local',
    },

Switch to

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

this should work

I had the same error here and it worked for me

os BRs se entendem kkk

possible solution, it worked for me

1 - Go to “whatsapp-web.js/util/Constants.js”

2 - where is

webVersionCache: {
        type: 'local',
    },

Switch to

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

this should work