nkjm / faq-bot-sample

Sample Chatbot implementation for FAQ purpose
MIT License
15 stars 12 forks source link

Heroku one-click Deployment issue #2

Open dennissetiawan opened 5 years ago

dennissetiawan commented 5 years ago

Hello I already tried to deploy the apps , the heroku app turns out to be error. I'm wondering what did I do wrong or does the code got some issues? Here I attach informations that I input to the env variable and where I get that. Please kindly help. ss.zip

dennissetiawan commented 5 years ago

Hello, now I can get the fallback intent correctly where the bot pass the message to admin by adding /webhook for the webhook and changing the private key to include ---- START.... ----- . But there is an existing error in dialogflow, the message can be detected in the log received but the answer of the agent is not coming through.

Heroku log

2019-06-12T05:38:54.935712+00:00 heroku[router]: at=info method=POST path="/webhook" host=linebot-ppappti.herokuapp.com request_id=7d1cbe68-545a-4f62-8d98-51df6a9af3c8 fwd="147.92.149.168" dyno=web.1 connect=0ms service=1ms status=200 bytes=201 protocol=https 2019-06-12T05:38:54.934361+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:memory Found plugin for specified memory store. Loading memory-cache.js... 2019-06-12T05:38:54.934526+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Webhook runs. 2019-06-12T05:38:54.934528+00:00 app[web.1]: 2019-06-12T05:38:54.934529+00:00 app[web.1]: 2019-06-12T05:38:54.934625+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Messenger is line 2019-06-12T05:38:54.934769+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Messenger specific required options all set. 2019-06-12T05:38:54.934924+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:messenger Loading facebook.js... 2019-06-12T05:38:54.935102+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:messenger Loading google.js... 2019-06-12T05:38:54.935464+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:messenger Loading line.js... 2019-06-12T05:38:54.935592+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Messenger abstraction instantiated. 2019-06-12T05:38:54.935979+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Signature validation succeeded. 2019-06-12T05:38:54.936063+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook Processing following event. 2019-06-12T05:38:54.936288+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook { type: 'message', 2019-06-12T05:38:54.936290+00:00 app[web.1]: replyToken: '149a789ee42c4f10a5bed03f084e07a3', 2019-06-12T05:38:54.936292+00:00 app[web.1]: source: 2019-06-12T05:38:54.936293+00:00 app[web.1]: { userId: 'U4b31d04bd45c59bfa2307d0eeaea9cd6', type: 'user' }, 2019-06-12T05:38:54.936295+00:00 app[web.1]: timestamp: 1560317934241, 2019-06-12T05:38:54.936297+00:00 app[web.1]: message: { type: 'text', id: '10027328477866', text: 'hi' } } 2019-06-12T05:38:54.936370+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook memory id is U4b31d04bd45c59bfa2307d0eeaea9cd6. 2019-06-12T05:38:54.936666+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:webhook event type is message. 2019-06-12T05:38:54.936768+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:flow ### This is Start Conversation Flow. ### 2019-06-12T05:38:54.937038+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:nlu Found plugin for specified NLU service. Loading dialogflow.js... 2019-06-12T05:38:54.937194+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:nlu Dialogflow sessions client found in cache. 2019-06-12T05:38:54.937455+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:flow NLU Abstraction instantiated. 2019-06-12T05:38:54.937539+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:54 GMT bot-express:flow Going to identify intent of hi... 2019-06-12T05:38:55.257342+00:00 heroku[router]: at=info method=POST path="/webhook" host=linebot-ppappti.herokuapp.com request_id=523d7394-d011-4e75-9223-057ba122b756 fwd="64.233.172.148" dyno=web.1 connect=0ms service=1ms status=200 bytes=201 protocol=https 2019-06-12T05:38:55.256308+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:memory Found plugin for specified memory store. Loading memory-cache.js... 2019-06-12T05:38:55.256416+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:webhook Webhook runs. 2019-06-12T05:38:55.256419+00:00 app[web.1]: 2019-06-12T05:38:55.256422+00:00 app[web.1]: 2019-06-12T05:38:55.256535+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:webhook This event comes from unsupported message platform. Skip processing. 2019-06-12T05:38:55.256728+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:index Successful End of Webhook. Current context follows. 2019-06-12T05:38:55.256815+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:index null 2019-06-12T05:38:55.320669+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:flow Look for input.welcome skill. 2019-06-12T05:38:55.320905+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:flow Skill not found. 2019-06-12T05:38:55.321356+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:webhook Abnormal End of Flow. 2019-06-12T05:38:55.321495+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:webhook Context cleared. 2019-06-12T05:38:55.321735+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:index Abnormal End of Webhook. Error follows. 2019-06-12T05:38:55.321808+00:00 app[web.1]: Wed, 12 Jun 2019 05:38:55 GMT bot-express:index Error: Cannot find module '../../../../skill/input.welcome' 2019-06-12T05:38:55.321811+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15) 2019-06-12T05:38:55.321814+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:562:25) 2019-06-12T05:38:55.321816+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:690:17) 2019-06-12T05:38:55.321818+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18) 2019-06-12T05:38:55.321820+00:00 app[web.1]: at StartConversationFlow.instantiate_skill (/app/node_modules/bot-express/module/flow/flow.js:55:31) 2019-06-12T05:38:55.321822+00:00 app[web.1]: at done_identify_intent.then (/app/node_modules/bot-express/module/flow/start_conversation.js:141:44) 2019-06-12T05:38:55.321824+00:00 app[web.1]: at tryCatcher (/app/node_modules/bluebird/js/release/util.js:16:23) 2019-06-12T05:38:55.321826+00:00 app[web.1]: at Promise._settlePromiseFromHandler (/app/node_modules/bluebird/js/release/promise.js:512:31) 2019-06-12T05:38:55.321828+00:00 app[web.1]: at Promise._settlePromise (/app/node_modules/bluebird/js/release/promise.js:569:18) 2019-06-12T05:38:55.321830+00:00 app[web.1]: at Promise._settlePromise0 (/app/node_modules/bluebird/js/release/promise.js:614:10) 2019-06-12T05:38:55.321832+00:00 app[web.1]: at Promise._settlePromises (/app/node_modules/bluebird/js/release/promise.js:693:18) 2019-06-12T05:38:55.321834+00:00 app[web.1]: at Async._drainQueue (/app/node_modules/bluebird/js/release/async.js:133:16) 2019-06-12T05:38:55.321836+00:00 app[web.1]: at Async._drainQueues (/app/node_modules/bluebird/js/release/async.js:143:10) 2019-06-12T05:38:55.321838+00:00 app[web.1]: at Immediate.Async.drainQueues [as _onImmediate] (/app/node_modules/bluebird/js/release/async.js:17:14) 2019-06-12T05:38:55.321841+00:00 app[web.1]: at runCallback (timers.js:705:18) 2019-06-12T05:38:55.321843+00:00 app[web.1]: at tryOnImmediate (timers.js:676:5)

Dialogflow log

{ "responseId": "e6fb7dc5-1700-417d-98ca-cd3eb51ef1fd-f568217a", "queryResult": { "queryText": "hi", "action": "input.welcome", "parameters": {}, "allRequiredParamsPresent": true, "fulfillmentText": "Good day! What can I do for you today?", "fulfillmentMessages": [ { "text": { "text": [ "Good day! What can I do for you today?" ] } } ], "intent": { "name": "projects/ppa-ppti-lifebot-asmbcd/agent/intents/d6fd83cd-b262-4be6-807c-4a7e8557f0d9", "displayName": "Default Welcome Intent" }, "intentDetectionConfidence": 1, "diagnosticInfo": { "webhook_latency_ms": 65 }, "languageCode": "en" }, "webhookStatus": { "code": 3, "message": "Webhook call failed. Error: Failed to parse webhook JSON response: Expect message object but got: \"OK\"." } }