Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

channel-messenger configuration doesn't work #279

Closed
bissolli opened this issue May 30, 2018 · 3 comments · Fixed by botpress/botpress#683
Closed

channel-messenger configuration doesn't work #279

bissolli opened this issue May 30, 2018 · 3 comments · Fixed by botpress/botpress#683

Comments

@bissolli
Copy link

bissolli commented May 30, 2018

  • Node version: 8.11.2

Botpress version: 10.11.1

Channels: @botpress/channel-messenger


I can't save my settings through the Dashboard. Getting the following error in my logs:

TypeError: config.saveAll is not a function
    at /my-chatbot/node_modules/@botpress/channel-messenger/bin/webpack:/src/index.js:212:16
    at Layer.handle [as handle_request] (/my-chatbot/node_modules/express/lib/router/layer.js:95:5)
    at next (/my-chatbot/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/my-chatbot/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/my-chatbot/node_modules/express/lib/router/layer.js:95:5)
    at /my-chatbot/node_modules/express/lib/router/index.js:281:22
    at Function.process_params (/my-chatbot/node_modules/express/lib/router/index.js:335:12)
    at next (/my-chatbot/node_modules/express/lib/router/index.js:275:10)
    at /my-chatbot/node_modules/body-parser/lib/read.js:130:5
    at invokeCallback (/my-chatbot/node_modules/raw-body/index.js:224:16)
    at done (/my-chatbot/node_modules/raw-body/index.js:213:7)
    at IncomingMessage.onEnd (/my-chatbot/node_modules/raw-body/index.js:273:7)
    at emitNone (events.js:106:13)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
@slvnperron
Copy link
Member

@bissolli Can you update your channel-messenger version? There's no more UI.

@bissolli
Copy link
Author

bissolli commented May 30, 2018

Hey @slvnperron , it was 10.0.2!
I had to run npm install --save @botpress/channel-messenger@10.11.1 to get the latest one.
Running only npm install --save @botpress/channel-messenger I get the 10.0.2.

Problem solved!

Quick question, now that I have the channel-messenger under the config folder and don't have UI anymore, how can I make my setting take effect? For example, I want to add Get Started button, I set as true in the settings file, but even restarting the service running bp start, it doesn't take effect!

Log:

> botpress start

21:59:44 - info: Starting botpress version 10.11.1
21:59:44 - info: [Ghost Content Manager] (transparent) Initialized
21:59:44 - info: [Skills] Initiated
21:59:44 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed in `botpress@3.0` – Please see bp.renderers instead.
21:59:44 - info: Loaded @botpress/audience, version 10.11.1
21:59:44 - info: Loaded @botpress/channel-messenger, version 10.11.1
21:59:45 - info: Loaded @botpress/channel-web, version 10.11.1
21:59:45 - info: Loaded @botpress/hitl, version 10.11.1
21:59:45 - info: Loaded @botpress/nlu, version 10.11.1
21:59:45 - info: Loaded @botpress/skill-choice, version 10.11.1
21:59:45 - info: Loaded 6 modules
21:59:45 - info: [Skills] Loaded 1 skills
21:59:45 - info: Read 7 item(s) from builtin_text.json
21:59:45 - info: Bot launched. Visit: http://localhost:3000
21:59:46 - info: ------------
21:59:46 - info: Webchat available at http://localhost:3000/s/chat
21:59:46 - info: ------------
21:59:47 - error:  Error: An error has been returned by Facebook API.
Status: 400 (Bad Request)
An unknown error occurred
    at /botpress/node_modules/@botpress/channel-messenger/bin/webpack:/src/messenger.js:615:15
    at PassThroughHandlerContext.finallyHandler (/botpress/node_modules/bluebird/js/release/finally.js:56:23)
    at PassThroughHandlerContext.tryCatcher (/botpress/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/botpress/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/botpress/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/botpress/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/botpress/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/botpress/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/botpress/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/botpress/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

Bot seems to be working on facebook messenger, but get started button, persistent menu and others settings don't .

@epaminond epaminond changed the title Saving settings for channel-messenger - config.saveAll is not a function channel-messenger configuration doesn't work Jun 4, 2018
@slvnperron
Copy link
Member

I think the problem is the error 400 might prevent further configuration from being saved to Facebook. Please remove the ads permission from the default permissions in the channel-messenger.json file and see if that helps. (A PR would be nice if that works)

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

Successfully merging a pull request may close this issue.

2 participants