wppconnect-team / wppconnect

WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination
https://wppconnect.io
Other
1.84k stars 319 forks source link

error contactStatus Error #2179

Closed antirek closed 3 months ago

antirek commented 3 months ago

Description

try getStatus - receive error

error contactStatus Error: o.StatusStore.find is not a function
     at /usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:107:31
     at step (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:49:23)
     at Object.next (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:30:53)
     at fulfilled (/usr/src/app/node_modules/@wppconnect-team/wppconnect/dist/api/helpers/evaluate-and-return.js:21:58)
 JS Stack: TypeError: o.StatusStore.find is not a function
     at t.getStatus (/usr/src/app/node_modules/@wppconnect/wa-js/dist/wppconnect-wa.js:2:225807)
 Function: function (contactId) { return __awaiter(_this, void 0, void 0, function () {
                             var status;
                             return __generator(this, function (_a) {
                                 switch (_a.label) {
                                     case 0: return [4 /*yield*/, WPP.contact.getStatus(contactId)];
                                     case 1:
                                         status = _a.sent();
                                         return [2 /*return*/, {
                                                 id: contactId,
                                                 status: (status === null || status === void 0 ? void 0 : status.status) || status,
                                             }];
                                 }
                             });
                         }); }

Environment

icleitoncosta commented 3 months ago

Hello, this was a temporary error caused by a change in WhatsApp. Please update wa-js. npm install @wppconnect/wa-js@latest