whatsapp-web.js
whatsapp-web.js copied to clipboard
TypeError: Cannot read properties of undefined (reading 'createWid')
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
I use the injected.js from a chrome extension and when i use this code:
const newMessage = async (chatId, message) => { const chatWid = window.Store.WidFactory.createWid(chatId); const chat = await window.Store.Chat.find(chatWid); const msg = await window.WWebJS.sendMessage(chat, message);
return msg.serialize();
}
newMessage("[email protected]", "hi, how are you?");
is not working
Expected behavior
Yestarday the code was sending messages and today is not working
Steps to Reproduce the Bug or Issue
inject the file injected.js on whatsapp web and than, run the code on terminal
Relevant Code
No response
Browser Type
Google Chrome
WhatsApp Account Type
WhatsApp Business
Does your WhatsApp account have multidevice enabled?
Yes, I am using Multi Device
Environment
windows 11 Whatsapp Web version: latest version
Additional context
No response
faced same problem today
Similar problem here: cannot convert wid to ChatJid
I have the same problem ..
Same problem now
no solution yet to "cannot convert wid to ChatJid"?
Wrong user id is passed, check example.js