Wa-automate-nodejs: ReferenceError: WAPI is not defined

Created on 21 Nov 2019  路  19Comments  路  Source: open-wa/wa-automate-nodejs

ReferenceError: WAPI is not defined error thrown while sending and receiving is dead

Most helpful comment

Pushed a new v. 1.2.9 to npm. Please update and test it out. Thanks, everyone!

All 19 comments

@OmarAttia Getting the same error as of today, Looking into it 馃憖 haven't found anything yet馃 . @smashah any ideas?

I guess it's puppeteer related issue

not sure, used it a couple days ago w/out problems. Puppeteer is opening whatsapp web and authenticating correctly however most of the methods on the package fail throwing out this error. I'm thinking it may have something to do with whatsapp web page

window.Store.ChatClass.default.prototype.sendMessage = function (e) {
return window.Store.SendTextMsgToChat(this, ...arguments);
}

Line 62 wapi.js

the problem lies here

window.Store.ChatClass.default.prototype.sendMessage = function (e) {
return window.Store.SendTextMsgToChat(this, ...arguments);
}

Line 62 wapi.js

the problem lies here

Yeah. I fix here.

window.Store.ChatClass is undefined!
@phantom-limb post the fix then

window.Store.ChatClass.default.prototype.sendMessage = function (e) {
return window.Store.SendTextMsgToChat(this, ...arguments);
}
Line 62 wapi.js
the problem lies here

Yeah. I fix here.

@phantom-limb how?

I disabled sending function.

LOL

I disabled sending function.

There isn't a better solution than ignoring the problem it seems 馃う鈥嶁檪

@OmarAttia any luck?

in progress

in progress

@OmarAttia how are you trying to approach it, maybe I can also jump in and try to find a solution too. At this point I don't really know what else to look for

we need to redefine window.Store.Chat

@OmarAttia can you make a pr with the fix?

Sure, as soon as I finish

In meantime here is another discussion of this issue on the source of wapi.js https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/754

@smashah thnx very much

Have a few mins with the laptop, will push a new version in around 5 mins. Thanks all for your help and bringing up the issue.

Pushed a new v. 1.2.9 to npm. Please update and test it out. Thanks, everyone!

Was this page helpful?
0 / 5 - 0 ratings