botpress / v12

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

Error white start the bot and facebook messenger not found #355

Closed themeix closed 6 years ago

themeix commented 6 years ago

I am getting error while start the botpress. Still dashboard can be accessible but facebook messenger module not found there.

Here following the error :

root@server:/home/public_html# yarn start
yarn run v1.7.0
$ botpress start
23:03:34 - debug: [DB Janitor] Added table "logs"
23:03:34 - info: Starting botpress version 10.23.0
23:03:34 - info: [DB Janitor] Started
23:03:34 - info: [Ghost Content Manager] (transparent) Initialized
23:03:34 - debug: [Ghost Content Manager] (transparent) Added root folder generated/media, doing nothing.
23:03:34 - debug: [Ghost Content Manager] (transparent) Added root folder generated/flows, doing nothing.
23:03:34 - info: [Skills] Initiated
23:03:34 - info: Loaded @botpress/audience, version 10.23.0
23:03:34 - verbose: [Renderers] Enabled for webchat.
23:03:34 - info: Loaded @botpress/channel-web, version 10.23.0
23:03:34 - info: Loaded @botpress/hitl, version 10.23.0
23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/intents, doing nothing.
23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/entities, doing nothing.
23:03:35 - info: Loaded @botpress/nlu, version 10.23.0
23:03:35 - info: Loaded @botpress/skill-choice, version 10.23.0
23:03:35 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed – Please see bp.renderers instead.
23:03:35 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed – Please see bp.renderers instead.
23:03:35 - verbose: [Renderers] Enabled for facebook.
23:03:35 - info: Loaded botpress-messenger, version 2.2.11
23:03:35 - info: Loaded 6 modules
23:03:35 - info: [Skills] Loaded 1 skills
23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/content, doing nothing.
23:03:35 - debug: Loading middleware: hitl.captureOutMessages
23:03:35 - debug: Loading middleware: webchat.sendMessages
23:03:35 - debug: Loading middleware: rendering.instrumentation
23:03:35 - debug: Loading middleware: hitl.captureInMessages
23:03:35 - debug: SKIPPING middleware: messenger.sendMessages  [Reason=disabled]
23:03:35 - debug: Loading middleware: nlu.incoming
23:03:35 - debug: Loading middleware: hear
23:03:35 - debug: Loading middleware: fallback
23:03:35 - debug: Loading data for builtin_text from builtin_text.json
23:03:35 - info: Read 7 item(s) from builtin_text.json
23:03:35 - error: [FATAL] An unhandled exception occurred in your bot
{ message: 'bind EADDRINUSE null:3000',
  stack: 'Error: bind EADDRINUSE null:3000\n    at Object._errnoException (util.js:1022:11)\n    at _exceptionWithHostPort (util.js:1044:20)\n    at listenOnMasterHandle (net.js:1411:16)\n    at rr (internal/cluster/child.js:111:12)\n    at Worker.send (internal/cluster/child.js:78:7)\n    at process.onInternalMessage (internal/cluster/utils.js:42:8)\n    at emitTwo (events.js:131:20)\n    at process.emit (events.js:214:7)\n    at process.emit (/home/public_html/node_modules/source-map-support/source-map-support.js:439:21)\n    at emit (internal/child_process.js:772:12)\n    at _combinedTickCallback (internal/process/next_tick.js:141:11)\n    at process._tickDomainCallback (internal/process/next_tick.js:218:9)',
  code: 'EADDRINUSE',
  errno: 'EADDRINUSE',
  syscall: 'bind',
  address: null,
  port: 3000 }
23:03:35 - error: Error: bind EADDRINUSE null:3000
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at listenOnMasterHandle (net.js:1411:16)
    at rr (internal/cluster/child.js:111:12)
    at Worker.send (internal/cluster/child.js:78:7)
    at process.onInternalMessage (internal/cluster/utils.js:42:8)
    at emitTwo (events.js:131:20)
    at process.emit (events.js:214:7)
    at process.emit (/home/public_html/node_modules/source-map-support/source-map-support.js:439:21)
    at emit (internal/child_process.js:772:12)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickDomainCallback (internal/process/next_tick.js:218:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:


Botpress version: 10.23.0

Channels: Messenger

slvnperron commented 6 years ago

This errors tells that the port 3000 is already in use. Make sure there's no other bot running. If that's not the case, run "killall node" or restart your computer, as you probably have an old process running in the background.

You may also change the port of Botpress by setting the BOTPRESS_PORT env variable, like:

"BOTPRESS_PORT=3001 yarn start"

On Thu, Jul 19, 2018 at 7:07 PM, Themeix LLC notifications@github.com wrote:

I am getting error while start the botpress. Still dashboard can be accessible but facebook messenger module not found there.

Here following the error :

root@server:/home/public_html# yarn start yarn run v1.7.0 $ botpress start 23:03:34 - debug: [DB Janitor] Added table "logs" 23:03:34 - info: Starting botpress version 10.23.0 23:03:34 - info: [DB Janitor] Started 23:03:34 - info: [Ghost Content Manager] (transparent) Initialized 23:03:34 - debug: [Ghost Content Manager] (transparent) Added root folder generated/media, doing nothing. 23:03:34 - debug: [Ghost Content Manager] (transparent) Added root folder generated/flows, doing nothing. 23:03:34 - info: [Skills] Initiated 23:03:34 - info: Loaded @botpress/audience, version 10.23.0 23:03:34 - verbose: [Renderers] Enabled for webchat. 23:03:34 - info: Loaded @botpress/channel-web, version 10.23.0 23:03:34 - info: Loaded @botpress/hitl, version 10.23.0 23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/intents, doing nothing. 23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/entities, doing nothing. 23:03:35 - info: Loaded @botpress/nlu, version 10.23.0 23:03:35 - info: Loaded @botpress/skill-choice, version 10.23.0 23:03:35 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed – Please see bp.renderers instead. 23:03:35 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed – Please see bp.renderers instead. 23:03:35 - verbose: [Renderers] Enabled for facebook. 23:03:35 - info: Loaded botpress-messenger, version 2.2.11 23:03:35 - info: Loaded 6 modules 23:03:35 - info: [Skills] Loaded 1 skills 23:03:35 - debug: [Ghost Content Manager] (transparent) Added root folder generated/content, doing nothing. 23:03:35 - debug: Loading middleware: hitl.captureOutMessages 23:03:35 - debug: Loading middleware: webchat.sendMessages 23:03:35 - debug: Loading middleware: rendering.instrumentation 23:03:35 - debug: Loading middleware: hitl.captureInMessages 23:03:35 - debug: SKIPPING middleware: messenger.sendMessages [Reason=disabled] 23:03:35 - debug: Loading middleware: nlu.incoming 23:03:35 - debug: Loading middleware: hear 23:03:35 - debug: Loading middleware: fallback 23:03:35 - debug: Loading data for builtin_text from builtin_text.json 23:03:35 - info: Read 7 item(s) from builtin_text.json 23:03:35 - error: [FATAL] An unhandled exception occurred in your bot { message: 'bind EADDRINUSE null:3000', stack: 'Error: bind EADDRINUSE null:3000\n at Object._errnoException (util.js:1022:11)\n at _exceptionWithHostPort (util.js:1044:20)\n at listenOnMasterHandle (net.js:1411:16)\n at rr (internal/cluster/child.js:111:12)\n at Worker.send (internal/cluster/child.js:78:7)\n at process.onInternalMessage (internal/cluster/utils.js:42:8)\n at emitTwo (events.js:131:20)\n at process.emit (events.js:214:7)\n at process.emit (/home/public_html/node_modules/source-map-support/source-map-support.js:439:21)\n at emit (internal/child_process.js:772:12)\n at _combinedTickCallback (internal/process/next_tick.js:141:11)\n at process._tickDomainCallback (internal/process/next_tick.js:218:9)', code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'bind', address: null, port: 3000 } 23:03:35 - error: Error: bind EADDRINUSE null:3000 at Object._errnoException (util.js:1022:11) at _exceptionWithHostPort (util.js:1044:20) at listenOnMasterHandle (net.js:1411:16) at rr (internal/cluster/child.js:111:12) at Worker.send (internal/cluster/child.js:78:7) at process.onInternalMessage (internal/cluster/utils.js:42:8) at emitTwo (events.js:131:20) at process.emit (events.js:214:7) at process.emit (/home/public_html/node_modules/source-map-support/source-map-support.js:439:21) at emit (internal/child_process.js:772:12) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickDomainCallback (internal/process/next_tick.js:218:9) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Make sure these checkboxes are checked before raising an issue, thank you!

Please also fill in these fields:

Botpress version: 10.23.0 Channels: Messenger

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/botpress/v12/issues/355, or mute the thread https://github.com/notifications/unsubscribe-auth/ABQStBOnHKoaUPwmt488g5FNwO7iYKOXks5uIRFPgaJpZM4VXOLW .

-- Sylvain Perron Director at Botpress https://botpress.io/ | ⚡ the conversational revolution sylvain@botpress.io T | +1 418 440 7586 Calendar Slots: Partnerships https://calendar.google.com/calendar/selfsched?sstoken=UUNxa1dWY0VQUTdDfGRlZmF1bHR8YTFkODZkYmE5ZTE0MmVkOGZkMjFkNjU3MGEwYjgxZjc | Enterprises https://calendar.google.com/calendar/selfsched?sstoken=UUlrdlNiM3dGblEtfGRlZmF1bHR8Mzk5MDUwMGQzZWM1NDMwMjg2M2UyY2QzM2EwNWE1ODg

themeix commented 6 years ago

I am using VPS server and there should not have multiple bot. I just created 1 there . But while i am using your command BOTPRESS_PORT=3001 yarn start i did not get any the others error.

Now it showing,

23:20:45 - debug: [DB Janitor] Added table "logs"
23:20:45 - info: Starting botpress version 10.23.0
23:20:45 - info: [DB Janitor] Started
23:20:45 - info: [Ghost Content Manager] (transparent) Initialized
23:20:45 - debug: [Ghost Content Manager] (transparent) Added root folder genera                                                                                                                                                             ted/media, doing nothing.
23:20:45 - debug: [Ghost Content Manager] (transparent) Added root folder genera                                                                                                                                                             ted/flows, doing nothing.
23:20:45 - info: [Skills] Initiated
23:20:45 - info: Loaded @botpress/audience, version 10.23.0
23:20:45 - verbose: [Renderers] Enabled for webchat.
23:20:45 - info: Loaded @botpress/channel-web, version 10.23.0
23:20:45 - info: Loaded @botpress/hitl, version 10.23.0
23:20:45 - debug: [Ghost Content Manager] (transparent) Added root folder genera                                                                                                                                                             ted/intents, doing nothing.
23:20:45 - debug: [Ghost Content Manager] (transparent) Added root folder genera                                                                                                                                                             ted/entities, doing nothing.
23:20:45 - info: Loaded @botpress/nlu, version 10.23.0
23:20:45 - info: Loaded @botpress/skill-choice, version 10.23.0
23:20:45 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed –                                                                                                                                                              Please see bp.renderers instead.
23:20:45 - warn: DEPRECATION NOTICE – bp.umm is deprecated and will be removed –                                                                                                                                                              Please see bp.renderers instead.
23:20:45 - verbose: [Renderers] Enabled for facebook.
23:20:45 - info: Loaded botpress-messenger, version 2.2.11
23:20:45 - info: Loaded 6 modules
23:20:45 - info: [Skills] Loaded 1 skills
23:20:45 - debug: [Ghost Content Manager] (transparent) Added root folder genera                                                                                                                                                             ted/content, doing nothing.
23:20:45 - debug: Loading middleware: hitl.captureOutMessages
23:20:45 - debug: Loading middleware: webchat.sendMessages
23:20:45 - debug: Loading middleware: rendering.instrumentation
23:20:45 - debug: Loading middleware: hitl.captureInMessages
23:20:45 - debug: SKIPPING middleware: messenger.sendMessages  [Reason=disabled]
23:20:45 - debug: Loading middleware: nlu.incoming
23:20:45 - debug: Loading middleware: hear
23:20:45 - debug: Loading middleware: fallback
23:20:45 - debug: Loading data for builtin_text from builtin_text.json
23:20:45 - info: Read 7 item(s) from builtin_text.json
23:20:45 - info: Bot launched. Visit: http://localhost:3001
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, applicationID                                                                                                                                                              needs to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, accessToken n                                                                                                                                                             eeds to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, appSecret nee                                                                                                                                                             ds to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, hostname need                                                                                                                                                             s to be defined. See "./botpress-messenger.config.yml".
23:20:45 - error: [notification::botpress] Error updating Messenger App. Please                                                                                                                                                              see logs for details.
23:20:45 - debug: Loading data for builtin_image from builtin_image.json
23:20:45 - debug: Loading data for builtin_single-choice from builtin_single-cho                                                                                                                                                             ice.json
23:20:45 - debug: Loading data for builtin_card from builtin_card.json
23:20:45 - debug: Loading data for builtin_action-button from builtin_action-but                                                                                                                                                             ton.json
23:20:45 - info: Read 1 item(s) from builtin_action-button.json
23:20:45 - debug: Loading data for builtin_carousel from builtin_carousel.json
23:20:45 - debug: Loading data for builtin_raw from builtin_raw.json
23:20:46 - debug: [NLU::Native] Model is up to date
23:20:46 - info: ------------
23:20:46 - info: Webchat available at http://localhost:3001/s/chat
23:20:46 - info: ------------

Can you tell me why messenger is not working there?

themeix commented 6 years ago

How may i solve the facebook messenger issue? There have not enough documentation for that when we are getting error to install that.

epaminond commented 6 years ago

@themeix , you could use something like sudo netstat -tulpn to see what's running on port 3000. Could it be that you are trying to start the bot while it's already running?

As for messenger you can see warnings in logs:

23:20:45 - warn: [botpress-messenger] Configuration is incomplete, applicationID                                                                                                                                                              needs to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, accessToken n                                                                                                                                                             eeds to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, appSecret nee                                                                                                                                                             ds to be defined. See "./botpress-messenger.config.yml".
23:20:45 - warn: [botpress-messenger] Configuration is incomplete, hostname need  

Could you complete it? It's described in the README as "Get all required fields from config/channel-messenger.json"

themeix commented 6 years ago

Yes.. i already update the code in both place botpress-messgenger.config.yml and channel-messgenger.json file..

But sill same error.

15:59:58 - info: Bot launched. Visit: http://localhost:3000
15:59:58 - warn: [botpress-messenger] Configuration is incomplete, applicationID needs to be defined. See "./botpress-messenger.config.yml".
15:59:58 - warn: [botpress-messenger] Configuration is incomplete, accessToken needs to be defined. See "./botpress-messenger.config.yml".
15:59:58 - warn: [botpress-messenger] Configuration is incomplete, appSecret needs to be defined. See "./botpress-messenger.config.yml".
15:59:58 - warn: [botpress-messenger] Configuration is incomplete, hostname needs to be defined. See "./botpress-messenger.config.yml".
15:59:58 - error: [notification::botpress] Error updating Messenger App. Please see logs for details.
15:59:58 - debug: Loading data for builtin_image from builtin_image.json
15:59:58 - debug: Loading data for builtin_single-choice from builtin_single-choice.json
15:59:58 - debug: Loading data for builtin_card from builtin_card.json
15:59:58 - debug: Loading data for builtin_action-button from builtin_action-button.json
15:59:58 - info: Read 1 item(s) from builtin_action-button.json
15:59:58 - debug: Loading data for builtin_carousel from builtin_carousel.json
15:59:58 - debug: Loading data for builtin_raw from builtin_raw.json
15:59:58 - error:
{ message: 'An error has been returned by Facebook API.\nStatus: 400 (Bad Request)\nAn unknown error occurred',
  stack: 'Error: An error has been returned by Facebook API.\nStatus: 400 (Bad Request)\nAn unknown error occurred\n    at /home/public_html/node_modules/@botpress/channel-messenger/bin/webpack:/src/messenger.js:615:15\n    at PassThroughHandlerContext.finallyHandler (/home/public_html/node_modules/bluebird/js/release/finally.js:56:23)\n    at PassThroughHandlerContext.tryCatcher (/home/public_html/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/home/public_html/node_modules/bluebird/js/release/promise.js:512:31)\n    at Promise._settlePromise (/home/fc/public_html/node_modules/bluebird/js/release/promise.js:569:18)\n    at Promise._settlePromise0 (/home/public_html/node_modules/bluebird/js/release/promise.js:614:10)\n    at Promise._settlePromises (/home/public_html/node_modules/bluebird/js/release/promise.js:693:18)\n    at Async._drainQueue (/home/public_html/node_modules/bluebird/js/release/async.js:133:16)\n    at Async._drainQueues (/home/public_html/node_modules/bluebird/js/release/async.js:143:10)\n    at Immediate.Async.drainQueues (/home/public_html/node_modules/bluebird/js/release/async.js:17:14)\n    at runCallback (timers.js:789:20)\n    at tryOnImmediate (timers.js:751:5)\n    at processImmediate [as _immediateCallback] (timers.js:722:5)' }
15:59:58 - debug: [NLU::Native] Model is up to date
epaminond commented 6 years ago

Is it possible for me to check the sources?

themeix commented 6 years ago

Yes... Obviously... Please go there https://themeix.com/ and lets talk in a chat. I am trying to run botpress from yesterday.. It would be my great help

themeix commented 6 years ago

Thanks for the help. But still i am struggling to use botpress. Because it does not start working yet. Getting the follwoing error,

14:53:28 - error:
{ message: 'An error has been returned by Facebook API.\nStatus: 400 (Bad Reques                                                                                                                                                             t)\n(#100) Param callback_url is not a valid URI.',
  stack: 'Error: An error has been returned by Facebook API.\nStatus: 400 (Bad R                                                                                                                                                             equest)\n(#100) Param callback_url is not a valid URI.\n   

In my facebook app area i used that url for the callback url : https://exampe.com/api/botpress-messenger/webhook

epaminond commented 6 years ago

@dmytropanontko , any ideas this could happen? This seems to be a duplicate of https://github.com/botpress/v12/issues/355 that has pending PR to be merged.

dmytropanontko commented 6 years ago

Hi @themeix sorry by wait. Did you set hostname variable in ./config/channel-messenger.json

epaminond commented 6 years ago

@themeix , are you still getting an issue?

themeix commented 6 years ago

I could not resolve the issue so i am using now Dialogue. It would be awesome if i could use the Botpress.. You guys are awesome..

epaminond commented 6 years ago

@themeix , it's a pity! As of @dmytropanontko he also had same issue but changing hostname fixed it. So closing this one. Feel free to reopen if you still experience it.