zerowidth / camper_van

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

Tweets crash camper_van #22

Closed wallace closed 11 years ago

wallace commented 11 years ago

Any time a tweet arrives, camper_van crashes with an error message similar to the following. This occurs with the latest tag of firering (1.2.2) and master.

2013-01-07 20:23:17 15060 WARN CamperVan : WARNING: Could not set attribute 'tweet' to value '{:author_avatar_url=>"http://a0.twimg.com/profile_images/1261953917/headshot_normal.png", :author_username=>"tenderlove", :id=>288351675289317377, :message=>"Chewing the fat with various steak holders."}' on Firering::Message object. It is likely the Campfire API has changed. Please report this! (https://github.com/EmmanuelOga/firering/issues) 2013-01-07 20:23:17 15060 INFO CamperVan : closed connection from 127.0.0.1 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... 2013-01-07 20:23:17 15060 ERROR CamperVan : http error . Trying again in 2 seconds... /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/utils.rb:15:in stringify_keys': undefined methodkeys' for #String:0x007f9f9ba34890 (NoMethodError) from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:370:in block in map_message_to_irc' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:390:inuser_for_message' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:260:in map_message_to_irc' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/channel.rb:250:inblock in stream_campfire_to_channel' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/connection.rb:90:in call' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/connection.rb:90:inblock in stream' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/connection.rb:103:in call' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/connection.rb:103:in<<' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/firering-1.2.2/lib/firering/connection.rb:103:in block in stream' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:275:incall' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:275:in on_decoded_body_data' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:268:inon_body_data' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:582:in process_chunk_body' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:330:indispatch' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/em-http-request-0.3.0/lib/em-http/client.rb:256:in receive_data' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun_machine' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/lib/camper_van/server.rb:21:inrun' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/gems/camper_van-0.0.6/bin/camper_van:64:in <top (required)>' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/bin/camper_van:19:inload' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/bin/camper_van:19:in <main>' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:ineval' from /Users/jonathanwallace/.rvm/gems/ruby-1.9.3-p327/bin/ruby_noexec_wrapper:14:in `

'

zerowidth commented 11 years ago

Hmm, it looks as if the campfire API has changed. Instead of putting the tweet information in the body of the message, it's now attempting to assign a "tweet" attribute.

wallace commented 11 years ago

I guess if we can ping the firering owner (@EmmanuelOga) to create a new release we'll be in good shape based on https://github.com/EmmanuelOga/firering/commit/17a611cf6f3c41450c45b7a23c38570f9440b5de and then we won't need my PR in #23 ?

zerowidth commented 11 years ago

I didn't realize the firering error wasn't fatal, it was the mishandling of non-YAML message body. Merged the PR and cut a new release, thanks!