#Recently I received a erro to send messages or seen send

10 messages · Page 1 of 1 (latest)

loud marsh
#

Hello world, today in the last version we got this error: Cannot read properties of undefined (reading 'markedUnread').

Has anyone with more experience encountered anything similar?

magic jackal
#

Having the same issue as well

haughty lintel
#

#general message

royal sail
#

Yeah, same

dire flint
#

Same here. Please mention once you solved this error.

final quiver
#

Me too. I suspect the latest whatsapp web update broke it

loud marsh
#

fix temp:
this.client.on('ready', async () => {

        // 🔧 FIX: Desabilitar sendSeen
        // Ref: https://github.com/pedroslopez/whatsapp-web.js/issues (Discord discussion)
        // Crédito: chatgpt via d3fa4ult (Discord)
        try {
            const page = this.client.pupPage;
            if (page) {
                await page.evaluate(() => {
                    // @ts-ignore - WWebJS é injetado pelo whatsapp-web.js no runtime
                    if (window.WWebJS && window.WWebJS.sendSeen) {
                        // Substituir sendSeen por função vazia para evitar erro
                        // @ts-ignore
                        window.WWebJS.sendSeen = async () => {};
                    }
                });
            }
        } catch (error) {
            this.logger.warn(`${error.message}`);
        }

}

GitHub

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app - pedroslopez/whatsapp-web.js

bright cove
#

Same here.