Slack Examples cannot receive events or messages
martibi opened this issue · 9 comments
I have installed the express
example app manually, and setup the bot scope accordingly, but I cannot receive any events or commands. There is a 500 Internal server error that is being returned.
I did not modify anything, I used the original version of the express
example in botbuilder-slack
:
- Only the first call to events endpoint was successful:
- Subsequently, when I tried to send a message to the app, 500 is returned:
- My Slack app Events setup is as follows:
@martibi Can you show the stacktrace of the error ? Only the 500
message will not help to troubleshoot the issue.
Thanks!
How do I print the stacktrace of the error?
You should be able to do:
bot.on("error", (error) => {
console.log(error, error.stack)
})
Adding bot.on("error") doesn't work, I had to modify the botbuilder-slack library code to display the error:
Error: Bot not found
at Object.botLookup (botbuilder-slack/example/src/express.ts:16:29)
at EventInteractor.call (botbuilder-slack/example/node_modules/botbuilder-slack/src/interactors/event_interactor.ts:27:50)
at botbuilder-slack/example/node_modules/botbuilder-slack/src/slack_connector.ts:84:10
at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)
at next (botbuilder-slack/example/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (botbuilder-slack/example/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)
at botbuilder-slack/example/node_modules/express/lib/router/index.js:281:22
at Function.process_params (botbuilder-slack/example/node_modules/express/lib/router/index.js:335:12)
at next (botbuilder-slack/example/node_modules/express/lib/router/index.js:275:10)
at urlencodedParser (botbuilder-slack/example/node_modules/body-parser/lib/types/urlencoded.js:82:7)
at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (botbuilder-slack/example/node_modules/express/lib/router/index.js:317:13)
at botbuilder-slack/example/node_modules/express/lib/router/index.js:284:7
at Function.process_params (botbuilder-slack/example/node_modules/express/lib/router/index.js:335:12)
at next (botbuilder-slack/example/node_modules/express/lib/router/index.js:275:10) 'Error: Bot not found\n at Object.botLookup (botbuilder-slack/example/src/express.ts:16:29)\n at EventInteractor.call (botbuilder-slack/example/node_modules/botbuilder-slack/src/interactors/event_interactor.ts:27:50)\n at botbuilder-slack/example/node_modules/botbuilder-slack/src/slack_connector.ts:84:10\n at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)\n at next (botbuilder-slack/example/node_modules/express/lib/router/route.js:137:13)\n at Route.dispatch (botbuilder-slack/example/node_modules/express/lib/router/route.js:112:3)\n at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)\n at botbuilder-slack/example/node_modules/express/lib/router/index.js:281:22\n at Function.process_params (botbuilder-slack/example/node_modules/express/lib/router/index.js:335:12)\n at next (botbuilder-slack/example/node_modules/express/lib/router/index.js:275:10)\n at urlencodedParser (botbuilder-slack/example/node_modules/body-parser/lib/types/urlencoded.js:82:7)\n at Layer.handle [as handle_request] (botbuilder-slack/example/node_modules/express/lib/router/layer.js:95:5)\n at trim_prefix (botbuilder-slack/example/node_modules/express/lib/router/index.js:317:13)\n at botbuilder-slack/example/node_modules/express/lib/router/index.js:284:7\n at Function.process_params (botbuilder-slack/example/node_modules/express/lib/router/index.js:335:12)\n at next (botbuilder-slack/example/node_modules/express/lib/router/index.js:275:10)'
Anyway, this indicates that the bot was not installed successfully. installationUpdate
is not being called, as there was no output from that function. Any ideas why?
@mohyt were you able to solve it?
@santiagodoldan : I created a new connector as this one is using lots of deprecated versions
What do you mean by "lots of deprecated versions"? I could be wrong, but I think we have only 2 dependencies botbuilder
and slack