botpress / v12

Botpress OSS – v12
https://v12.botpress.com
GNU Affero General Public License v3.0
71 stars 85 forks source link

botpress messenger : Unhandled Rejection in Promise: Promise , Cannot convert undefined or null to object at Function.assign .... #386

Closed jerry7411 closed 5 years ago

jerry7411 commented 6 years ago

I got an error after I clicked the Get Started button in Messenger image Can anyone help me ?

dmytropanontko commented 6 years ago

@jerry7411 Hi can you provide your config/channel-messenger.json? and how you try listening GET_STARTED?

epaminond commented 6 years ago

As of @jerry7411 's logs it's coming from getOrFetchUserProfile.

epaminond commented 6 years ago

@jerry7411 , was an issue resolved for you?

huydox commented 6 years ago

As I researched, looks like Facebook had an update on getUserProfile API, they do not allow to get all fields by default. You can only get first_name, last_name and profile_pic. https://developers.facebook.com/docs/messenger-platform/identity/user-profile/

dmytropanontko commented 6 years ago

@huydox not at all. You need allow FB app to fetch other fields. Go to Messenger ->Settings -> App Review for Messenger and to choose all field

jagatfx commented 6 years ago

I agree with @huydox that it looks to be a change in the default fields available before review, even for the admin account. Trimming the permission list requested by channel-messenger as discussed in https://github.com/botpress/v12/issues/396 was the only way I could communicate with the bot.

elinguiuriel commented 6 years ago

@dmytropanontko in the api version 3.1, for app created after the 1st august 2018, you only have gender, location and language after the review process. so @huydox and @jagatfx are right.

dmytropanontko commented 6 years ago

@slvnperron @emirotin Do we need remove locale,timezone,gender from this request ?

emirotin commented 6 years ago

We need to cut it by default but let them be fetched if the user has the app approval. Looks like it should be a new config field for the messenger module.

dmk23 commented 6 years ago

Yes this sounds like it needs changes to the config

epaminond commented 6 years ago

@dmytropanontko , is there a PR for this one?

wadabender commented 6 years ago

@dmytropanontko When will the changes you made to the permissions asked be changed?

dmk23 commented 6 years ago

@epaminond Just confirmed that @dmytropanontko fix works. Let's get it merged...

vspiewak commented 6 years ago

Without this PR merged, newcomers can't do FB messenger bot right now...