-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Question: Is there a troubleshooting guide (for Slack)? #1835
Comments
I am experiencing the exact same behaviour. I tracked down the incoming HTTP POST requests by adding logs directly in node modules. |
Which node modules did you edit to get logs of incoming HTTP POST? I'd like to try that |
I just added a
|
Actually if you add your own middleware down the chain (after |
As noted above, I tried |
I was referring to the express middlewares in
You should see the slack payload, which means the messages do reach this point. But after this, I don't know where they're lost... |
It's fixed for me. The issue was an invalid |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Are you sure this is an issue with the Botkit core module?
Yes, TL;DR I believe there is insufficient information on logging and troubleshooting.
I think there's more value in ending up with a google-able guide (vs a personal answer in Slack), so I'm writing this up as a GitHub issue.
What are you trying to achieve or the steps to reproduce?
I'm having trouble getting a new bot working (my first in this framework, although I've written 6 or 7 of them in various Slack frameworks since 2011). I'm trying to get the basic hear/respond behavior from the examples to function, but it isn't.
Here's how I set things up:
npm install -g yo generator-botkit
- Botkit Docsyo botkit
and fill in all the stuff fromhttps://api.slack.com/apps/<MY APP ID>/general?
bot.js
with the appropriate scopes specified for the Slack apphttps://api.slack.com/apps/<MY APP ID>/event-subscriptions?
with server URL + webhook endpoint reported abovecurl -X POST -H 'Content-type: application/json' --data '{"token":"foobar","challenge":"44","type":"url_verification"}' http://localhost:3000/api/messages
shows a local response as well.What was the result you received?
Despite responding to the
url_verification
message as indicated above, this code infeatures/sample_hears.js
doesn't seem to fire when the bot is running and I type things into Slack:I can't get a response from the bot, whether @-mentioning, DMing, or just talking to in a public channel.
What did you expect?
I expected the app to fail or succeed as a whole. Instead, the verification step initiated by Slack works just fine but nothing else seems to work. Slack reports the bot as offline, even though I can run the curl command above (that does the
url_verification
) and see it work.What I'm looking for is a troubleshooting guide of some kind, possibly paired with a debug option.
So, how do I verify that Slack is sending me messages in the first place? Is there a way I can log that? How can I send slack-style messages to myself with
curl
to verify that the app responds in an appropriate way?And can we put these answers in a document somewhere?
Context:
v13.0.0
node:13.0-alpine
image (previouslynode:alpine
with nodev10.12.0
, which didn't work either)The text was updated successfully, but these errors were encountered: