-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hubot Slack Integration Issue #448
Comments
I have this same issue. My existing hubot with slack integration stopped working part way through last week. I looked at it today, it was starting but giving no output at all, even with debug enabled. Dug around and it does error if you don't provide a slack token or the token is refused. I upgraded my hubot-slack library to 4.4.0 and now I get the same output as above:
It looks like it was expecting more environment variables but I can't find any docs on which ones. Any pointers would be gratefully received. |
I think part of the issue here is that I'm an Enterprise Grid slack user, I'm not sure! My hubot has been working well with slack for about 6-9 months, it stopped about 2 weeks ago. So far, I've found that the tokens aren't being passed to the RTM client, and that for enterprise slack I need to use the When I send my bot a message, I get another fatal error because the message data received does not contain all the expected fields. It looks like this:
I'm not sure if this is relevant, intentional, or should be in a separate bug. Just trying to be verbose in case it helps anyone! |
Still no luck for me. I tried doing the same as you mentioned above, but the bot just doesn't come up. [Mon Nov 27 2017 23:35:15 GMT-0700 (MST)] DEBUG Loading adapter slack |
It looks like you need the code change that is in the referenced pull request as well as just sending the token manually in the config. This allows my bot to log in but it crashes when it receives a message. The bot error when a message arrives is because of the missing fields as I posted above - however those fields are populated when the message first arrives in the node SDK - but something goes wrong in the user lookup step so by the time hubot gets it, the fields are empty. It seems like this slack/hubot combination isn't particularly common, or maybe it's hard to support it for enterprise gateway customers. Either way, I've got an existing application with broken slack integration so I'll probably have to reimplement it with an alternative slack solution, I don't think I can make any more progress on bug fixing this and I didn't get a response to my first PR. |
sorry for the delay in response here folks, im on top of this issue now. @lornajane big thanks for PR #452 and @Roach for narrowing down the high level problem in #453. @niladrisb29 can i just get clarification that the hang you first experienced was also while connecting to a relatively large (in number of users) workspace? @lornajane and @niladrisb29 would you mind confirming that when connecting to a smaller workspace, without the there's a few ideas i have about solving this issue, but it boils down to trying to get this hubot adapter independent of the RtmClient dataStore object (#385). this will be tricky to get right because we will need to add code that queries the Web API for any data that isn't available in the dataStore so that the message properties are all preserved by the time your scripts handle them. its also tricky because i personally cannot test this on a team that is very large (but I'll work on getting access to one internally if i can). one idea i have is to use pagination on endpoints that tend to time out on large teams (e.g. i'm going to make fixing this issue my top priority for the remainder of the week and i'll update this ticket with the progress I make. this might involve merging #452, but i need some more time to investigate. |
Here are the immediate tasks I've identified to help solve this issue:
|
I took a similar approach (ended up moving away from hubot in the process but still happy to help with getting this fixed for others if I can) https://lornajane.net/posts/2017/slack-enterprise-grid-and-botkit. I do have access to a pretty large org that I can do a little bit of testing on if that helps |
Update: user.list pagination is implemented in #454 |
Update: identified SlackFormatter as an API that needs to be revised: #456 |
I have the same problem as in the last screenshot, it just hangs! I checked everything in my environment, it works on docker but I can't run docker forever. |
@polkien how large of a team are you trying to connect to? we haven't made a release since the |
@aoberoi my team is not that large, it is less than 10 users right now. If that was the problem it would be a problem when running on docker node:alpine too but it is not... I am trying on windows and it was just fine last year before holidays, came back to work and I found this issue. Don't know what to do now jeje. |
@polkien i just tried on Windows and it connected, so i guess we'll have to dig a bit deeper. can you please create a new Issue, i think this isn't the same issue as the one being discussed here. once you do, i can to dig deeper with you. |
some progress being made in #461 |
@aoberoi I realized the issue is with my laptop only when I am connected through a proxy, even with all proxy settings in place (I think!). I will have to figure out the problem in my configuration because it works pretty well from a home network. Sorry for the trouble :$! |
@here I have similar type of issue .I am trying to integrate hubot with slack. I am trying to run hello world hubot program . Steps tried:- I also copied " hello-world.coffee" inside /scripts directory of hubot installation . I also After executing below command , I am not able to get any response from hubot. I have pass $ HUBOT_SLACK_TOKEN=xoxb-308094275906-fIKtZ7nPBIKw5UUWSAQu42xq bin/hubot --adapter slack Any idea?? |
@npithadi that happens to me only when I am at work (behind my company's proxy), it sometimes connects after many attempts. |
@polkien But I am not able to connect even in my company's network. I wanted this working |
@npithadi I got it working by setting the following environment variables in windows: HTTP_PROXY (pointing to the same proxy server) |
@polkien I am using MAC OS. What are the setttings for it? |
@npithadi it should be the same I think (remember this is for nodejs), if those two doesn't work, I would try with:
You can test with temporary variables by running (this will be effective in the current terminal session):
Please take a look at how to set environment variables for referece. |
@polkien no problem! if you're looking for information about how to use this Hubot adapter behind a proxy, the answer is in this comment: #372 (comment) @npithadi i'm not sure your issue is the proxy settings, but i also don't think its the same as this issue. can you start a new issue and describe your issue by filling out the template? |
this issue should be fixed by #465 |
@aoberoi I am able to fix this. |
@npithadi hey did you solved the issue?. I am having the exact issue as you said above. My hubot is running fine in cmd but when integrated with slack I am not getting any responses. The bot turns green when ./bin/hubot.cmd -a slack is executed. I am looking for help. It was working fine 2 days back and suddenly I am not getting any responses. Error: npm WARN hubot-help@0.2.2 requires a peer of coffee-script@^1.12.6 but none is installed. You must install peer dependencies yourself. up to date in 1.461s Your hubot-scripts.json is empty, so you just need to remove it. |
@ActivBytes I am not able to solve this issue on MAC OS. i have installed it on linux vm. |
@npithadi These are my latest errors: C:\Users\ADMIN\Desktop\hello>.\bin\hubot.cmd -a slack audited 371 packages in 3.055s error: Response not OK: invalid_auth Anyone out there who successfully installed in windows machine. |
@lornajane issue solved? I am facing the same in windows machine |
@AndreasHogan i don't think your issue is the same that was referenced above. the i'm going to close this issue because the original issue is fixed, but if you're still having difficulty, feel free to open a new issue. |
|
Description
Hubot doesn't start with slack adapter as parameter.
Describe your issue here.
Hi, I have downloaded and installed the latest version of Hubot in my Linux server. The bot is starting up fine in local instance; but, as I pass Hubot slack token and adapter as slack, it just gets stuck.
I have invoked the slack url from my server using curl, and it just responds fine. I was also able to post a test msg on SLACK #general channel using curl.
Few info for reference: ( I have also attached screenshots for reference)
Server where Hubot is installed:Linux
hubot-slack: 4.4.0
Following are the env variables I have in place: (within my Linux server)
(I have removed the host, port, and hubot token)
export NODEJS_HOME=/usr/lib/nodejs/node-v8.9.0
export PATH=$NODEJS_HOME/bin:$PATH
export https_proxy=HOST:PORT
export http_proxy=HOST:PORT
export HUBOT_SLACK_TOKEN=xTOKEN
export HUBOT_LOG_LEVEL="debug"
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
hubot-slack version:4.4.0
node version: 5.5.1
OS version(s):Red Hat Enterprise Linux Server release 6.9 (Santiago)
Steps to reproduce:
1.Install hubot (npm install -g yo generator-hubot)
2.Configure Hubot to use slack as adapter(yo hubot --adapter=slack)
3.Start hubot by passing the slack token as parameter:
HUBOT_SLACK_TOKEN=x********* bin/hubot --adapter slack
Expected result:
What you expected to happen
Hubot should start up and connect to slack channel as per the token.
Actual result:
The bot just doesn't come up and fails to give me the interactive command prompt.
What actually happened
The bot just doesn't come up and appears to get hung.
PFB all screenshots for reference:
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.



The text was updated successfully, but these errors were encountered: