The error occurs when running the script inside the cache folder.
node_modules\.pnpm\whatsapp-web.js@1.23.0\node_modules\whatsapp-web.js\src\webCache\LocalWebCache.js:34
const version = indexHtml.match(/manifest-([\d\\.]+)\.json/)[1]
I put it to insert a fixed value 2.2206.9 and it didn't have the same error, but scanning the qr code it didn't do anything else and when I try to call the end point it gives the following error
node_modules\.pnpm\puppeteer@13.7.0\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221
throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
^
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'getChats')
at __puppeteer_evaluation_script__:2:40
at ExecutionContext._evaluateInternal (C:\Dev\Rpa\APi Whatsapp\api_whatsapp\node_modules\.pnpm\puppeteer@13.7.0\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:221:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ExecutionContext.evaluate (C:\Dev\Rpa\APi Whatsapp\api_whatsapp\node_modules\.pnpm\puppeteer@13.7.0\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:110:16)
at async Client.getChats (C:\Dev\Rpa\APi Whatsapp\api_whatsapp\node_modules\.pnpm\whatsapp-web.js@1.23.0\node_modules\whatsapp-web.js\src\Client.js:927:21)
at async C:\Dev\Rpa\APi Whatsapp\api_whatsapp\app.js:284:19
Expected behavior
N/A
Steps to Reproduce the Bug or Issue
N/A
Relevant Code
No response
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
LocalWebCache.js
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;
Is there an existing issue for this?
Describe the bug
The error occurs when running the script inside the cache folder.
I put it to insert a fixed value
2.2206.9
and it didn't have the same error, but scanning the qr code it didn't do anything else and when I try to call the end point it gives the following errorExpected behavior
N/A
Steps to Reproduce the Bug or Issue
N/A
Relevant Code
No response
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
LocalWebCache.js
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;
Additional context
No response