GithubHelp home page GithubHelp logo

No response from Hubot about hubot-slack HOT 14 CLOSED

slackapi avatar slackapi commented on May 23, 2024
No response from Hubot

from hubot-slack.

Comments (14)

nkgwj avatar nkgwj commented on May 23, 2024

(Sorry about my poor English.)

I have a same issue.

With node-inspector, I confirmed hubot receive the messages, but it never responds.

I found a suspicious code area in listener.coffee by step-by-step execution

2014-09-30 15 53 26

I might be wrong,but It looks that all message doesn't match any listeners
.

from hubot-slack.

nkgwj avatar nkgwj commented on May 23, 2024

Without slack adapter, hubot responds normally.

For your reference,I attach a screenshot for this case.
2014-09-30 17 21 46

from hubot-slack.

nkgwj avatar nkgwj commented on May 23, 2024

On Debugger, I executed the following code for bypassing the 'instanceOf' check.

message.__proto__ = TextMessage.prototype

It works. How strange?

from hubot-slack.

svmaris avatar svmaris commented on May 23, 2024

Setting the __proto__ did not work for me. After some debugging it appears that the structure of message has somehow changed. Modifying the "instanceof" to the code below fixed the problem for me:

      if message.message? and message.message.text?
        message.message.text.match @regex

from hubot-slack.

nkgwj avatar nkgwj commented on May 23, 2024

Iapologize for not providing you with enough explanation.
Some hubot messages are not TextMessage truly, so the __proto__ don't work in such cases.

hubot has several message types:

TextMessage,EmoteMessage,EnterMessage,LeaveMessage,TopicMessage,CatchAllMessage

Because the condition expression in your code matches instances of TextMessage,it seems to work.
I don't know whether it is a robust solution,but I'll try it later anyway.

Thanks for sharing experience.

from hubot-slack.

epinault avatar epinault commented on May 23, 2024

Does Slack support EmoteMessage,EnterMessage,LeaveMessage,TopicMessage?

Also , @svmaris are you saying that this more of a hubot problem than slack then? or Slack is passing the wrong Type of message?

from hubot-slack.

epinault avatar epinault commented on May 23, 2024

Also I tried to change the listener.coffee .. and I see it going further but sill some errors now

[Fri Oct 03 2014 21:53:34 GMT+0000 (UTC)] ERROR TypeError: Cannot call method 'match' of undefined
at TextListener.callback (/mnt/zubot/scripts/google-images.coffee:24:8, :20:19)
at TextListener.Listener.call (/mnt/zubot/node_modules/hubot/src/listener.coffee:27:7, :23:14)
at Robot.receive (/mnt/zubot/node_modules/hubot/src/robot.coffee:197:9, :142:33)
at Robot.receive (/mnt/zubot/node_modules/hubot/src/robot.coffee:204:7, :153:21)
at Slack.Adapter.receive (/mnt/zubot/node_modules/hubot/src/adapter.coffee:66:5, :47:25)
at /mnt/zubot/node_modules/hubot-slack/src/slack.coffee:182:26, :185:16
at callbacks (/mnt/zubot/node_modules/hubot/node_modules/express/lib/router/index.js:161:37)
at param (/mnt/zubot/node_modules/hubot/node_modules/express/lib/router/index.js:135:11)
at pass (/mnt/zubot/node_modules/hubot/node_modules/express/lib/router/index.js:142:5)
at Router._dispatch (/mnt/zubot/node_modules/hubot/node_modules/express/lib/router/index.js:170:5)
at Object.router (/mnt/zubot/node_modules/hubot/node_modules/express/lib/router/index.js:33:10)
at next (/mnt/zubot/node_modules/hubot/node_modules/express/node_modules/connect/lib/proto.js:190:15)
at multipart (/mnt/zubot/node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/multipart.js:60:27)
at /mnt/zubot/node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:57:9
at IncomingMessage. (/mnt/zubot/node_modules/hubot/node_modules/express/node_modules/connect/lib/middleware/urlencoded.js:70:11)
at IncomingMessage.emit (events.js:92:17)
at _stream_readable.js:943:16
at process._tickCallback (node.js:419:13)

Sending message
Sending message
Sending message
Sending message
Sending message
Sending message
Failed to escape HTML: TypeError: Cannot call method 'replace' of undefined
Sending message
Sending message

from hubot-slack.

epinault avatar epinault commented on May 23, 2024

Seems that either Slack is using the wrong Message type or something is really broken :(

from hubot-slack.

nkgwj avatar nkgwj commented on May 23, 2024

I tried the @svmaris's hack and It works for me.

from hubot-slack.

kevinsimper avatar kevinsimper commented on May 23, 2024

I just setup hubot on Heroku with Slack and it worked fine :)

from hubot-slack.

lnyarl avatar lnyarl commented on May 23, 2024

I have same problem and solve. Check to see if the same two 'message.coffee' files. I had two message.coffee files in the different hubot packages.

from hubot-slack.

camflan avatar camflan commented on May 23, 2024

Hubot on heroku is receiving messages but never responds in any slack channel.

Anyone have any ideas?

from hubot-slack.

paulhammond avatar paulhammond commented on May 23, 2024

The recent v3 release of hubot-slack completely rewrites all of the code around how hubot communicates with slack, and any bugs in the old code won't be present in the new code. I hate to do this, but I'm going to close out this issue because we're not working on the old version any more. Sorry we didn't reply sooner.

We think the new adapter is much better in many ways. Try it out, and if it still doesn't work for you please feel free to open a new issue or email [email protected] so we can look into it.

from hubot-slack.

epinault avatar epinault commented on May 23, 2024

Sounds great. Will give it a to V3

from hubot-slack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.