#Working Script Erroring after updating

4 messages · Page 1 of 1 (latest)

glossy swift
#

After updating to the newest version, i get this error:

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'serialize')\n    at window.WWebJS.getMessageModel (pptr://__puppeteer_evaluation_script__:406:29)\n    at pptr://__puppeteer_evaluation_script__:11:34"}

The error occurs either directly after successfully sending a message which arrives or when marking a chat as unread:

await chat.sendMessage(message); // Sends message ("successfully" well it arrives i dont know if it errors in that call or after)
await chat.markUnread(); // Maybe here as well, it doesn't reach "Message sent successfully"
res.send({ status: 'Message sent successfully' });

I didn't see anything in the docs referencing this so I'm assuming it's a bug.
I'm also slightly confused because the package lock shows the version of whatsapp-web.js being the same as it previously was, but maybe one of the dependencies got an update

tawny pelican
#

Update the lib

glossy swift
# tawny pelican Update the lib

ah thanks it didn't update as i thought, but now i get ```
/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:744:36
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

...


could this be related to the cache being old?
tawny pelican
#

You are doing something wrong, revise your steps