-
Notifications
You must be signed in to change notification settings - Fork 27
Lita not able to accept Room Join invites #10
Comments
I found a bug that I think may be causing the issue you're seeing. Please try lita-hipchat 1.6.1, which I just released, and see if the join command is still failing for you. |
Hello, As earlier, I tried join commands as follows: join 1972_devops Tried Inviting the bot from MacOSX Client Version 2.6 (98) using Room Menu > Invite Users ... > BotName I also invited the Bot from Android Client Version 2.3.1 I tried to modify the Gem libraries by appending following in ~/.rvm/gems/ruby-2.1.2/gems/lita-hipchat-1.6.1/lib/lita/adapters/hipchat/connector.rb Line 36 def join(muc_domain, room)
Lita.logger.debug "Got Join Request" I am able to see the above string ( ie 'Got Join Request' ) for all rooms in config.adapter.rooms but not for Invites and Join's The Ruby version is 2.1.2 |
Sorry for the trouble you're having! Unfortunately, I haven't been able to reproduce this myself with 1.6.1. We'll need to determine exactly where the join is failing (in When you send the join command, do you see either "Already in room with JID <JID>" or "Joining room: <JID>" in the Lita logs? Of the five variations of messages you described in your last comment, the first one is the one you want: |
Trouble with OSS Projects ?? Naah! Its part of learning. I see the message is gettting passed on to Lita but no action is being taken. DEBUG: Dispatching PM to Lita from
DEBUG -- : RECEIVED:
DEBUG -- : PROCESSING: The debug logs before any modification are at http://pastebin.com/m5dDiEcn Modified ~/.rvm/gems/ruby-2.1.2/gems/lita-3.3.0/lib/lita/robot.rb def receive(message)
Lita.logger.debug "LITA: Received Message #{message}"
Lita.handlers.each { |handler| handler.dispatch(self, message) }
end Next modified to see if dispatch() is receiving command in ~/rvm./gems/ruby-2.1.2/gems/lita-3.3.0/lib/lita/handler.rb def dispatch(robot, message)
Lita.logger.debug "LITA: Dispatch Code #{robot}, #{message}"
routes.each do |route|
next unless route_applies?(route, message, robot)
log_dispatch(route)
dispatch_to_route(route, robot, message)
end
end I see the following logs: [2014-07-08 15:27:54 UTC] DEBUG: LITA: Received Message #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800>
[2014-07-08 15:27:54 UTC] DEBUG: LITA: Dispatch Code #<Lita::Robot:0x007fb0c5667600>, #<Lita::Message:0x007fb0ca273800> I can debug further if you could give me a pointer what the following code is doing: routes.each do |route|
next unless route_applies?(route, message, robot)
log_dispatch(route)
dispatch_to_route(route, robot, message)
end Sharing my configuration at http://pastebin.com/T7LXLStm Thank you for your time. |
I don't think there's a problem with the message getting dispatched to the correct route. It seems like something inside the HipChat adapter is the issue. Unfortunately invites are working on my setup, but if I had access to one where this problem was happening, I would start debugging it by adding additional debug logging to the |
Hello Jimmy, |
I wasn't implying that you should share access to your HipChat account. Sorry if that wasn't clear! I was just trying to provide some tips for debugging on your end. |
I appear to have something similar tanking my setup. I upgraded from 1.3.1 to 1.6.1 and it just seems to hang, never fully connecting. The Lita user shows as offline. Interestingly, it did all its lookups of users and joined rooms, but then sort of came to a halt looking up a fake (API) user. Or at least that was the last message in the logs.
|
It doesn't seem like they were related, but just in case, try the newly release v1.6.2 which included the fix for #15 and see if this is still happening. |
Yup, my report was actually about the problem diagnosed in #15 and v1.6.2 fixed it. Thanks. |
Closing due to inactivity. If this is still a problem and there is any additional information that could help debug it, please reopen it! :) |
I'm having this problem as well. Here are the steps to reproduce:
This looks like a problem that has been solved in another bot: justinweiss/robut#41 I don't have any familiarity with lita_hubot, but a quick scan didn't show any results for the string 'invite'. Can you reopen this? I'd love to help out if I can. |
We are having issues with this as well in our implementation. I will try and track down why it is happening for us and see if I can fix our specific issue. |
The reason this didn't work for me was that the join route is restricted to admins only. https://github.com/jimmycuadra/lita/blob/master/lib/lita/handlers/room.rb#L7 Add your user's JID in lita_config under config.robot.admins, problem solved. http://docs.lita.io/getting-started/usage/#authorization-groups |
It won't work without BUT! Every time after I invite lita to a new room, I have to restart lita to let it work .... |
Exact same problem as described by justintime #10 (comment) |
After a lot of troubleshooting, I found the problem. First, Lita doesn't automatically join on invitation. I got around this by overriding lita-hipchat's callback.rb to detect invitations and trigger an 'on invite' event. Then, in my handler for on invite, I join the room. Upon joining, here is where the actual problem lies. I'm not exactly sure why but lita-hipchat connector's join method does some check and returns To get around that problem, I again monkey patched that method to skip the mucs check. Hope this helps resolve this long standing issue. |
Hi,
I try inviting Lita to join Rooms using following commands by being in the room as well as on 1-on-1 chat (all through HipChat client for Mac OS X)
*** join 19873_devops **
#join 19873_devops
join #19873_devops
I have logged into the DevOps room and send invites but dont see *lita bot * accepting it or processing it.
Debug logs are here
Let me know if any further information is required.
The text was updated successfully, but these errors were encountered: