builderbot icon indicating copy to clipboard operation
builderbot copied to clipboard

ERROR CON DIALOGFLOW

Open Gamosky opened this issue 3 years ago • 12 comments

Hace un tiempo trabajaba en este boot, y lo deje por un periodo ahora que lo vuelvo a retomar tengo un error ya actualice a la ultima version y me manda el siguiente error, a alguien le paso lo mismo y que me pueda ayudar plis

(node:12920) UnhandledPromiseRejectionWarning: TypeError: nanoid is not a function at detectIntent (C:\laragon\www\bot-whatsapp-main\adapter\diaglogflow.js:35:46) at getDataIa (C:\laragon\www\bot-whatsapp-main\adapter\diaglogflow.js:70:5) at C:\laragon\www\bot-whatsapp-main\adapter\index.js:61:9 at new Promise () at getIA (C:\laragon\www\bot-whatsapp-main\adapter\index.js:55:28) at bothResponse (C:\laragon\www\bot-whatsapp-main\controllers\flows.js:19:24) at Client. (C:\laragon\www\bot-whatsapp-main\app.js:63:32) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use node --trace-warnings ... to show where the warning was created) (node:12920) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6) (node:12920) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Gamosky avatar May 04 '22 21:05 Gamosky

Hola lo solucioné instalando la versión 14 de nodejs ya que tenía también una versión superior (16) y me daba ese error

brahianf1 avatar May 05 '22 02:05 brahianf1

Hola lo solucioné instalando la versión 14 de nodejs ya que tenía también una versión superior (16) y me dio ese error

Esa version es la que tengo instalada la 14

Gamosky avatar May 05 '22 13:05 Gamosky

corregi el error anterior y ahora me manda este

(node:468) UnhandledPromiseRejectionWarning: Error: net::ERR_NAME_NOT_RESOLVED at https://web.whatsapp.com/ at navigate (C:\laragon\www\bot-whatsapp-main\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:156:23) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async FrameManager.navigateFrame (C:\laragon\www\bot-whatsapp-main\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:131:21) at async Frame.goto (C:\laragon\www\bot-whatsapp-main\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:512:16) at async Page.goto (C:\laragon\www\bot-whatsapp-main\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1167:16) at async Client.initialize (C:\laragon\www\bot-whatsapp-main\node_modules\whatsapp-web.js\src\Client.js:107:9)

Gamosky avatar May 05 '22 16:05 Gamosky

¿Alguien pudo resolver este error? o sabe a que se debe?

(node:7393) UnhandledPromiseRejectionWarning: TypeError: nanoid is not a function at detectIntent (/home/bot-whatsapp/adapter/diaglogflow.js:35:46) at getDataIa (/home/bot-whatsapp/adapter/diaglogflow.js:70:5) at /home/bot-whatsapp/adapter/index.js:61:9 at new Promise () at getIA (/home/bot-whatsapp/adapter/index.js:55:28) at bothResponse (/home/bot-whatsapp/controllers/flows.js:19:24) at Client. (/home/bot-whatsapp/app.js:63:32) at runMicrotasks () at processTicksAndRejections (internal/process/task_queues.js:95:5)

colmenabav avatar May 11 '22 20:05 colmenabav

parece que lo resolví en el archivo .env la variable de entorno del dialogflow tiene que estar en true

Gamosky avatar May 11 '22 20:05 Gamosky

parece que lo resolví en el archivo .env la variable de entorno del dialogflow tiene que estar en true

Ahora tira esto:

(node:7676) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stringValue' of undefined at detectIntent (/home/bot-whatsapp/adapter/diaglogflow.js:57:30) (Use node --trace-warnings ... to show where the warning was created) (node:7676) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:7676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

colmenabav avatar May 11 '22 21:05 colmenabav

parece que lo resolví en el archivo .env la variable de entorno del dialogflow tiene que estar en true

Ahora tira esto:

(node:7676) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'stringValue' of undefined at detectIntent (/home/bot-whatsapp/adapter/diaglogflow.js:57:30) (Use node --trace-warnings ... to show where the warning was created) (node:7676) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:7676) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Lo Resolvi con: KEEP_DIALOG_FLOW=true en .env

y actualizar Node v16.15.0 y npm a 8.5.5

Gracias!!!

colmenabav avatar May 12 '22 00:05 colmenabav

Leifer esta Issue la resolvi en Discord con quien creo la incidencia, el problema estaba en que no estaba instalada las dependencias. Puedes cerrarla

Gonzalito87 avatar May 13 '22 13:05 Gonzalito87

Hola, soy nuevo aqui, me daba un error en esta linea con dialogflow:

TypeError: Cannot read properties of undefined (reading 'payload') at detectIntent (C:\vcarchivos\leifernandez\bot-whatsapp\adapter\diaglogflow.js:59:39)

Pero como la costante customPayload, luego no se usa, simplemente comenté la linea y con eso ya esta funcionando. tengo node 16.13.2

mpiresnabais avatar Jun 03 '22 19:06 mpiresnabais

Hola, soy nuevo aqui, me daba un error en esta linea con dialogflow:

TypeError: Cannot read properties of undefined (reading 'payload') at detectIntent (E:\bot-whatsapp-main\adapter\diaglogflow.js:59:39)

Pero como la costante customPayload, luego no se usa, simplemente comenté la linea y con eso ya esta funcionando. tengo node 16.16.0 (tengo el mismo problema)

gian-alt avatar Jul 23 '22 23:07 gian-alt

Hola, soy nuevo aqui, me daba un error en esta linea con dialogflow:

TypeError: Cannot read properties of undefined (reading 'payload') at detectIntent (C:\vcarchivos\leifernandez\bot-whatsapp\adapter\diaglogflow.js:59:39)

Pero como la costante customPayload, luego no se usa, simplemente comenté la linea y con eso ya esta funcionando. tengo node 16.13.2

image comenta la linea

Gonzalito87 avatar Aug 07 '22 21:08 Gonzalito87

@leifermendez esta incidencia puedes cerrarla, ya te hago un PR corrigiendo el código, desde dialogflow ya no devuelve mas las variantes payload, alli esta el inconveniente

Gonzalito87 avatar Aug 07 '22 21:08 Gonzalito87

¿Alguna novedad sobre esta ISSUE?

github-actions[bot] avatar Dec 18 '22 23:12 github-actions[bot]