orkestral / venom

Venom is a high-performance system developed with JavaScript to create a bot for WhatsApp, support for creating any interaction, such as customer service, media sending, sentence recognition based on artificial intelligence and all types of design architecture for WhatsApp.
https://orkestral.io
Apache License 2.0
6.1k stars 1.2k forks source link

TypeError: Cannot read properties of undefined (reading 'erro') #2444

Closed LeonardoRSantos closed 1 year ago

LeonardoRSantos commented 1 year ago

Description

After starting the chatbot with venom, and sending a message to test the flow it keeps returning this error, at first it doesn't seem to interfere much, but when following the flow it prevents it from proceeding after validating the cpf, making it return every time to the cpf validation flow.

Environment

Venom version(s): latest Browser: Chrome 116 OS:Linux Node version: 16

Erro = TypeError: Cannot read properties of undefined (reading 'erro') at D:\thotwhatsapp-chatbot\node_modules\venom-bot\dist\api\layers\sender.layer.js:330:23 at runMicrotasks () at processTicksAndRejections (node:internal/process/task_queues:96:5)

diegobastos commented 1 year ago

Tbm estou com este mesmo erro

Em ter., 22 de ago. de 2023 20:10, Leonardo @.***> escreveu:

Description

After starting the chatbot with venom, and sending a message to test the flow it keeps returning this error, at first it doesn't seem to interfere much, but when following the flow it prevents it from proceeding after validating the cpf, making it return every time to the cpf validation flow. Environment

Venom version(s): latest Browser: Chrome 116 OS:Linux Node version: 16

— Reply to this email directly, view it on GitHub https://github.com/orkestral/venom/issues/2444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAPJVWMCAX2FL5KV5NFH7LXWVDADANCNFSM6AAAAAA32UYM6Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

rodolfoguiari commented 1 year ago

Here too

Davi-pontes commented 1 year ago

Aqui também estou tendo o mesmo erro

Gauravism2017 commented 1 year ago

https://github.com/orkestral/venom/blob/7d14c87bffe76a5d98060ce6ccd43f0a7da2aa52/src/api/layers/sender.layer.ts#L418

this lines seem to be causing the error, value of result here is undefined.

CarlosAurelioMRF commented 1 year ago

This change worked for me https://github.com/orkestral/venom/commit/7d14c87bffe76a5d98060ce6ccd43f0a7da2aa52

Clone the project, install it then run build. After that you can copy dist\lib\wapi\wapi.js to paste in your project while they dont create a new release.

onitorrinco commented 1 year ago

I am also getting the same error when sending messages

LeonardoRSantos commented 1 year ago

The solution is in discord, on the Portuguese server, you have to replace the file, node_modules\venom-bot\dist\api\layers\sender.layer.js change this file sender.layer.js for this one. Change the file from txt to .js and replace it in your node_modules, it worked for me. send.layer.txt

jonalan7 commented 1 year ago

this problem has now been fixed!