async persist(indexHtml) {
// extract version from index (e.g. manifest-2.2206.9.json -> 2.2206.9)
const version = indexHtml.match(/manifest-([\d\.]+).json/)[1];
if(!version) return;
it work fine until i didn't scan mine QR code
and server is not restarted
but if server have been restarted then i got errror
C:\Users\SDWORLLD\Documents\Project\whatsappBot\a2zv1\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:36
const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1];
TypeError: Cannot read properties of null (reading '1')
at LocalWebCache.persist (\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:36:69)
at \node_modules\whatsapp-web.js\src\Client.js:745:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Is there an existing issue for this?
Describe the bug
i have install latest version of this package
whatsapp-web.js/webCache/LocalWebCache.js
this file on function
async persist(indexHtml) { // extract version from index (e.g. manifest-2.2206.9.json -> 2.2206.9) const version = indexHtml.match(/manifest-([\d\.]+).json/)[1]; if(!version) return;
and server is not restarted
but if server have been restarted then i got errror
so i modify mine code on line
but another and so manny error arrived again
i have used this strategy to authenticate it
const client = new Client({ authStrategy: new LocalAuth(), });
Expected behavior
While i restart mine code it should login/authenticate normally and work simpally
Steps to Reproduce the Bug or Issue
1 authenticate with this starategy
const client = new Client({ authStrategy: new LocalAuth(), });
then restart server again
Relevant Code
Browser Type
Chromium
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
OS - Windows Phone - Android whatsapp-web.js version- 1.23.0 Whatsapp Web Version - 2.2411.2 Node Js Version - v20.10.0
Additional context
No i think i have explain and tell everything, and i have try to fix it by mine self