WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.22k stars 1.11k forks source link

TypeError: Cannot destructure property 'user' of '(0 , WABinary_1.jidDecode)(...)' as it is undefined. #848

Open ghost opened 1 month ago

ghost commented 1 month ago

@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:104:33

const { user } = (0, WABinary_1.jidDecode)(contactId);

@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:103:83

const contactHashes = await Promise.all(Object.keys(contacts).map(async (contactId

@whiskeysockets\baileys\lib\Utils\event-buffer.js:40:16

ev.on('event', (map) => {for (const event in map) {ev.emit(event, map[event]);}

@whiskeysockets\baileys\lib\Utils\event-buffer.js:73:16)

const consolidatedData = consolidateEvents(data);
        if (Object.keys(consolidatedData).length) {
            ev.emit('event', consolidatedData);
        }
        data = newData;

Full Console Error

Caught exception:  TypeError: Cannot destructure property 'user' of '(0 , WABinary_1.jidDecode)(...)' as it is undefined.
    at C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:104:33
    at Array.map (<anonymous>)
    at EventEmitter.<anonymous> (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:103:83)
    at EventEmitter.emit (node:events:530:35)
    at EventEmitter.<anonymous> (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Utils\event-buffer.js:40:16)     
    at EventEmitter.emit (node:events:518:28)
    at Object.flush (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Utils\event-buffer.js:73:16)
    at processNodeWithBuffer (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Socket\messages-recv.js:700:12)     
Caught exception:  TypeError: Cannot destructure property 'user' of '(0 , WABinary_1.jidDecode)(...)' as it is undefined.
    at C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:104:33
    at Array.map (<anonymous>)
    at EventEmitter.<anonymous> (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Store\make-in-memory-store.js:103:83)
    at EventEmitter.emit (node:events:530:35)
    at EventEmitter.<anonymous> (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Utils\event-buffer.js:40:16)     
    at EventEmitter.emit (node:events:518:28)
    at Object.flush (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Utils\event-buffer.js:73:16)
    at processNodeWithBuffer (C:\Users\astro\Documents\GitHub\WaCrasher\node_modules\@whiskeysockets\baileys\lib\Socket\messages-recv.js:700:12)     
bobslavtriev commented 1 month ago

https://github.com/WhiskeySockets/Baileys/pull/878