wit icon indicating copy to clipboard operation
wit copied to clipboard

TypeError: Cannot read property 'length' of undefined

Open SeunTo opened this issue 4 years ago • 1 comments

I want to report an error I am having with a messenger bot linked to wit.ai

**After hosting it on glitch and try chatting the bot, I keep getting the output below

webhook is listening on port 3000 { sender: { id: '4676416029106443' }, recipient: { id: '104120012150589' }, timestamp: 1640979308066, message: { mid: 'm_zm38Z9tLWPeMG5RO7cvBPvp0D02spiTViAqTrFa002e-p0jIQHE49mmYj_M5M8w5NGZdW-4jIlqjXyQZj2iPYA', text: 'Hi', nlp: { errors: [Array] } } } Message received from sender 4676416029106443 : Hi (node:166) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'length' of undefined**

Minimal demo of the problem above.

I expect to get a response from the bot through wit.ai app which has been trained

App ID: 601596880930583

SeunTo avatar Dec 31 '21 19:12 SeunTo

Hi @SeunTo, this seems to be an issue that you are accessing a property of an undefined object. It could be that you are accessing property that doesn't exist. What are the request and response from wit?

yuzh174 avatar Jan 04 '22 23:01 yuzh174

Closing due to no movement on the issue. Please re-open or file a new task should the issue be persisting.

Barbog avatar Apr 18 '23 09:04 Barbog