zerowidth / camper_van

A Campfire to IRC bridge
MIT License
129 stars 25 forks source link

crash when joining a room #8

Closed cotto closed 12 years ago

cotto commented 12 years ago

I ran into this while trying to connect to campfire through camper_van via dircproxy. Everything seems to work until I join a room.

2012-04-15 19:49:17  6919  INFO CamperVan : performing request to https://x.campfirenow.com.campfirenow.com/rooms.json
2012-04-15 19:49:17  6919 DEBUG CamperVan : irc <- :camper_van 403 christoph_otto #ecto-1 :No such campfire room!
2012-04-15 19:49:20  6919 DEBUG CamperVan : irc -> JOIN #ecto_1
2012-04-15 19:49:20  6919  INFO CamperVan : performing request to https://x.campfirenow.com.campfirenow.com/rooms.json
2012-04-15 19:49:20  6919  INFO CamperVan : performing request to https://x.campfirenow.com.campfirenow.com/room/426698.json
2012-04-15 19:49:20  6919 DEBUG CamperVan : irc <- :christoph_otto!cotto@96.126.105.162 JOIN :#ecto_1
2012-04-15 19:49:20  6919  INFO CamperVan : closed connection from 96.126.105.162
/home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/lib/camper_van/channel.rb:59:in `+': can't convert nil into String (TypeError)
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/lib/camper_van/channel.rb:59:in `block in join'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/lib/camper_van/channel.rb:239:in `call'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/lib/camper_van/channel.rb:239:in `block in update_users'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/firering-1.1.1/lib/firering/data/room.rb:21:in `call'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/firering-1.1.1/lib/firering/data/room.rb:21:in `block in users'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/firering-1.1.1/lib/firering/connection.rb:68:in `call'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/firering-1.1.1/lib/firering/connection.rb:68:in `block in http'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/em/deferrable.rb:134:in `call'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/em/deferrable.rb:134:in `set_deferred_status'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/em/deferrable.rb:173:in `succeed'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/em-http-request-0.3.0/lib/em-http/client.rb:307:in `unbind'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:1417:in `event_callback'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/lib/camper_van/server.rb:21:in `run'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/gems/camper_van-0.0.3/bin/camper_van:64:in `<top (required)>'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/bin/camper_van:19:in `load'
        from /home/cotto/.rvm/gems/ruby-1.9.3-p125/bin/camper_van:19:in `<main>'
zerowidth commented 12 years ago

Curious! I wonder if there's a mismatch between how camper_van is mapping the room name with irc vs. how it's named in campfire itself. What's the room called? "Ecto-1" with a hyphen?

cotto commented 12 years ago

That seems very likely. The room appears on Campfire as "ECTO-1". I can successfully join another room without any dashes in the name.

zerowidth commented 12 years ago

I couldn't reproduce this. I created a campfire room called ECTO-1, and was able to join it just fine. I did notice your backtrace includes an older version of firering, though, perhaps that has an influence. Try updating and see if it works then.

justinpitts commented 11 years ago

I am reproducing this behavior right now, with a room named nexus, and the latest version of firering and camper_van.

2012-12-04 14:03:31 9011 INFO CamperVan : closed connection from 127.0.0.1 /home/jpitts/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:59:in +': can't convert nil into String (TypeError) from /home/jpitts/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:59:inblock in join' from /home/jpitts/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:240:in call' from /home/jpitts/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:240:inblock in update_users' from /home/jpitts/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/data/room.rb:22:in `call'

14:03:13 localhost -- | There is 1 user on 1 channel 14:03:13 localhost -- | 0 :IRC Operators online 14:03:13 localhost -- | 0 :channels formed 14:03:13 localhost -- | I have 1 client and 0 servers
14:03:13 localhost -- | - MOTD for camper_van - 14:03:13 localhost -- | - Welcome to CamperVan. 14:03:13 localhost -- | - To see what campfire rooms are available to the 14:03:13 localhost -- | - configured subdomain and api key, use the LIST command. 14:03:13 localhost -- | END of MOTD /LIST 14:03:23 localhost -- | #nexus(3) 14:03:23 localhost -- | End of list