claudiajs / claudia-bot-builder

Create chat bots for Facebook Messenger, Slack, Amazon Alexa, Skype, Telegram, Viber, Line, GroupMe, Kik and Twilio and deploy to AWS Lambda in minutes
https://claudiajs.com/claudia-bot-builder.html
MIT License
1.84k stars 254 forks source link

duplicated videos + Lambda requests timeout #81

Closed jay-jlm closed 7 years ago

jay-jlm commented 7 years ago

We are testing the bot on messenger.

Works fine for all other requests except when returning a video.

2 things happen: 1) The video appears 3 times in the chat window, instead of once.. as if the client was for some reason considering the requested failed and redoing the requests 2 more times. 2) Even thou alll the function is doing is generating a simple json template for facebook to consume, execution times out after 3000 ms

After increasing the lambda timeout limit to 10000 ms the video duplication problem seems to be mitigated, however the the function still times out.

We tested to log the output of the handler function and it's the same both using fbTemplate as well as building the JSON template by hand and it doesn't seem to have an effect.

The result of the function we wrote logs as this value:

{ attachment: 
{ type: 'video',
payload: { url: 'https://s3-sa-east-1.amazonaws.com/avidotec/videos/make-me-fat-playing-mode.mp4' } } }

NOTE: This also happens with example videos from the docs so the problem is not the video file

gojko commented 7 years ago

please use the community chat channel instead of github issues for discussion. we use github issues only for bugs

jay-jlm commented 7 years ago

Too bad this got closed without much feedback. We are still fighting this issue and have posted it to stack overflow: http://stackoverflow.com/questions/41814899/aws-lambda-sending-a-video-template-to-messenger-causes-lambda-to-timeout

tetreault commented 7 years ago

@jay-at-avido did you ever resolve this? I've posted in the gitter channel about it, ran out of troubleshooting ideas since my AWS Lambda timeout is set to 3 minutes.

guyschlider commented 6 years ago

+1

stojanovic commented 6 years ago

I'll reopen the issue if someone can provide a minimal project to reproduce the issue. Thanks!