ERROR CON DIALOGFLOW
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 (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.
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
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
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)
¿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 (
parece que lo resolvà en el archivo .env la variable de entorno del dialogflow tiene que estar en true
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.
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!!!
Leifer esta Issue la resolvi en Discord con quien creo la incidencia, el problema estaba en que no estaba instalada las dependencias. Puedes cerrarla
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
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)
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
comenta la linea
@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
¿Alguna novedad sobre esta ISSUE?