When client logged and bot was restarted, i receive this error:
/app/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 (/app/node_modules/whatsapp-web.js/src/webCache/LocalWebCache.js:34:69)
at /app/node_modules/whatsapp-web.js/src/Client.js:771:36
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.11.1
Solved problem: open file Constant.js, find and change
webVersionCache: {
type: 'local',
},
to
webVersionCache: {
type: 'remote',
remotePath: 'https://raw.githubusercontent.com/wppconnect-team/wa-version/main/html/2.2410.1.html',
},
![const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1]; const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1];](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicRhjuCuHq-GhLmf6is-S44l8mxF44sAbEj_gTWP_eM8bJndt9rdRluDDxmB9m_eIZP3qtAjy5vQHHLFg4-3kIaQXN35OXXfSKXTFnBpOYn1B0A0X_6EWl7CWnrhDr1EjmWXiGm7MUVQWTs_2k8PUTDaQ3Iy1OvuRM4FO8cdrzMPZxKJsmbWnZPrDr3-SC/w200-h200-rw/nodejs.png)
Post a Comment