botpress / modules

MOVING TO BOTPRESS/BOTPRESS, branch `develop/x`, folder "packages"
GNU Affero General Public License v3.0
23 stars 29 forks source link

Unable to use Botpress-Messenger with few users simultaneously #25

Open nicopetremann opened 6 years ago

nicopetremann commented 6 years ago

Hi team

I'm currently building a bot with Botpress and Messenger Module. I'm experiencing some trouble to get multiple users using the bot simultaneously. If two users are chatting with the bot at the same time, it answers one after the other, and then involves delay for the users. Any idea where does it come from?

Thx

slvnperron commented 6 years ago

Hi, could you share more information about your bot? Botpress version, Botpress-Messenger version and also how you're handling user responses?

Thanks

mvdt commented 6 years ago

@slvnperron Hi, i'm working with @nicopetremann. We are using the 10.2.1 (botpress and channel-messenger) and handling every ingoing messages with the dialogEngine. The issue only appears with Facebook. We tried to spam the bot with multiple users from FB and the internal Chat, and only users from FB where affected.

slvnperron commented 6 years ago

Thanks to both, will investigate now and get back to you ASAP

slvnperron commented 6 years ago

@mvdt Found the issue and pushed a fix, updating to version 10.13.4 (core & modules) will fix the issue for you. There shouldn't be much changes required on your side from 10.2 to 10.13, but please have a look at the changelog: https://botpress.io/docs/beta/reference/

mvdt commented 6 years ago

Thanks @slvnperron !

victorcorvenus commented 6 years ago

Hi Team,

I am using 10.17.3 (code and module). I am only seeing the bot responding through 1 of the user on messenger, my other users are unable to elicit a response through messenger, any ideas?

By the way, I am getting an error each time i do bp start. Error as follows, An error has been returned by Facebook API.\nStatus: 400 (Bad Request)\nAn unknown error occurred\nInvalid Permissions\nYou could not subscribe to some of the fields requested due to a permissions error. Related maybe?

Thanks.

slvnperron commented 6 years ago

Hey @victorcorvenus ,

Can you elaborate on the behavior you are seeing and how to replicate that?

For the error, you can remove the "ads" permission from the messenger config in the config/channel-messenger.json file.

victorcorvenus commented 6 years ago

Hi @slvnperron

Basically I have ngrok setup and done bp start. I sent message to the bot through messenger and the bot successfully responds through messenger without any errors.

But when I invited a few friends to try saying "Hi" in the same manner to the messenger page, the bot does not respond and under botpress "audience" section there are no new audiences added.

My friends tried with iPhone messenger app and through pc browser but still no response.

victorcorvenus commented 6 years ago

@slvnperron found the issue, basically I did not add my friends into the testers list

Important

Make sure the Facebook user from which you're sending the message is listed as the Admin or Developer or Tester in your app roles (https://developers.facebook.com/apps/YOUR_APP_ID/roles/). Messages from other users won't work unless your app is approved and publicly released.

Thanks!