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

Slack Examples cannot receive events or messages #85

Open
martibi opened this issue Sep 13, 2018 · 9 comments
Open

Slack Examples cannot receive events or messages #85

martibi opened this issue Sep 13, 2018 · 9 comments
Assignees

Comments

@martibi
Copy link

martibi commented Sep 13, 2018

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:

  1. Only the first call to events endpoint was successful:

events - ok 1

  1. Subsequently, when I tried to send a message to the app, 500 is returned:

events - inspect

  1. My Slack app Events setup is as follows:

events

@martibi
Copy link
Author

martibi commented Sep 13, 2018

Slack commands also do not work, and are received correctly, but return with a 500 error:

command

@bilby91
Copy link
Member

bilby91 commented Sep 16, 2018

@martibi Can you show the stacktrace of the error ? Only the 500 message will not help to troubleshoot the issue.

Thanks!

@martibi
Copy link
Author

martibi commented Sep 22, 2018

How do I print the stacktrace of the error?

@bilby91 bilby91 self-assigned this Sep 23, 2018
@bilby91
Copy link
Member

bilby91 commented Sep 23, 2018

You should be able to do:

  bot.on("error", (error) => {
    console.log(error, error.stack)
  })

@martibi
Copy link
Author

martibi commented Sep 25, 2018

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
Copy link

mohyt commented Oct 20, 2018

@martibi : I am facing the same issue, have you able to figure out the reason?

@santiagodoldan
Copy link
Member

@mohyt were you able to solve it?

@mohyt
Copy link

mohyt commented Dec 14, 2018

@santiagodoldan : I created a new connector as this one is using lots of deprecated versions

@santiagodoldan
Copy link
Member

What do you mean by "lots of deprecated versions"? I could be wrong, but I think we have only 2 dependencies botbuilder and slack

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

No branches or pull requests

4 participants