Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Facebook postback error #990

Closed
adrienbarreau opened this issue Sep 5, 2017 · 5 comments
Closed

Facebook postback error #990

adrienbarreau opened this issue Sep 5, 2017 · 5 comments

Comments

@adrienbarreau
Copy link

adrienbarreau commented Sep 5, 2017

I get this error on receiving a postback ([email protected]).

Facebook.js:267

TypeError: Cannot read property 'length' of undefined at Object.Facebookbot.facebook_botkit.handleWebhookPayload (/www/node_modules/botkit/lib/Facebook.js:267:59) at /www/node_modules/botkit/lib/Facebook.js:242:29 at Layer.handle [as handle_request] (/www/node_modules/botkit/node_modules/express/lib/router/layer.js:95:5) at next (/www/node_modules/botkit/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/www/node_modules/botkit/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/www/node_modules/botkit/node_modules/express/lib/router/layer.js:95:5) at /www/node_modules/botkit/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/www/node_modules/botkit/node_modules/express/lib/router/index.js:335:12) at next (/www/node_modules/botkit/node_modules/express/lib/router/index.js:275:10) at serveStatic (/www/node_modules/botkit/node_modules/serve-static/index.js:75:16) at Layer.handle [as handle_request] (/www/node_modules/botkit/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/www/node_modules/botkit/node_modules/express/lib/router/index.js:317:13) at /www/node_modules/botkit/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/www/node_modules/botkit/node_modules/express/lib/router/index.js:335:12) at next (/www/node_modules/botkit/node_modules/express/lib/router/index.js:275:10) at urlencodedParser (/www/node_modules/body-parser/lib/types/urlencoded.js:82:7)

@ouadie-lahdioui
Copy link
Collaborator

ouadie-lahdioui commented Sep 7, 2017

Are you using the new FB handover protocol API ? Are you subscribed to standby or messaging_handovers fields ?

Take a look at this issue #962

@adrienbarreau
Copy link
Author

No I'm not using FB handover protocol API and I subscribed to every fields...

messaging

@ouadie-lahdioui
Copy link
Collaborator

That's it, it's the same reason behind this one #962 also. try to unsubscribe from standby and messaging_handovers channels if you don't want to use the new handover API.

Lets me know if it worked for you !

@adrienbarreau
Copy link
Author

Thanks @ouadie-lahdioui. It works when unsubscribe from messaging_handovers and standby.

@ouadie-lahdioui
Copy link
Collaborator

Good 😉

@peterswimm can you close this one ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants