elcuervo / airplay

Airplay bindings to Ruby
MIT License
1.07k stars 70 forks source link

Crashing by Just Requiring #89

Open maddox opened 9 years ago

maddox commented 9 years ago

I'm not sure if i'm doing something stupid or not, but I can't get the gem to even load without a crash.

require 'rubygems'
require 'airplay'

=>

D, [2015-08-02T00:14:43.005309 #23236] DEBUG -- : Celluloid 0.17.0 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2015-08-02T00:14:49.176172 #23236] DEBUG -- : Terminating 5 actors...
/opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-0.6.0.pre5/lib/reel/response.rb:10:in `<class:Response>': uninitialized constant HTTP::Response::Status (NameError)
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-0.6.0.pre5/lib/reel/response.rb:4:in `<module:Reel>'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-0.6.0.pre5/lib/reel/response.rb:3:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-0.6.0.pre5/lib/reel.rb:13:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-rack-0.1.0/lib/reel/rack/server.rb:3:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-rack-0.1.0/lib/rack/handler/reel.rb:1:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-rack-0.1.0/lib/reel/rack.rb:2:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/server.rb:4:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/player.rb:8:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/playable.rb:1:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/device.rb:2:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/devices.rb:2:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay/browser.rb:5:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/airplay-1.0.3/lib/airplay.rb:2:in `<top (required)>'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /opt/rubies/2.1.6-github1/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from untitled:2:in `<main>'

I'm running this on Ruby 2.1.6.

maddox commented 9 years ago

FWIW, I just ran it on another system with 2.2.2p95 and it worked.

sodabrew commented 9 years ago

This looks similar to https://github.com/celluloid/reel-rack/issues/13 - could you double check your gem versions between the two Rubies? I doubt it's a Ruby thing or an airplay gem thing - it looks like an issue with the reel gem.

maddox commented 9 years ago

Yup, both using 0.4.0. I wonder if this version ever worked?

Looks like it just needs to be bumped to 0.5.0.

elcuervo commented 9 years ago

I'm going to check that tomorrow and bump a version if necessary ^_^

elcuervo commented 9 years ago

@maddox I just released 1.0.4 with updated gem versions. Version seemed to work in my current installation. Please give it a shot and ping me if that doesn't work :sparkles:

maddox commented 9 years ago

nope :(

D, [2015-08-03T16:17:53.119734 #31336] DEBUG -- : Celluloid 0.17.0 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
D, [2015-08-03T16:17:53.823394 #31336] DEBUG -- : Terminating 5 actors...
/opt/rubies/2.1.6-github1/lib/ruby/gems/2.1.0/gems/reel-0.6.0.pre5/lib/reel/response.rb:10:in `<class:Response>': uninitialized constant HTTP::Response::Status (NameError)

Interestingly, I just compared this trace with my original one, and both are using reel 0.6.0. So even though the spec said 0.4.0, I was using 0.6.0 the whole time. FWIW, it's still using the same version as before :/

I'm not using this in isolation, I have it installed to the system. I was just testing it for a second, rather than using it in an existing project. So I'm not sure if that matters.

elcuervo commented 9 years ago

I think I'm going to enforce Reel 0.5.0 since that seems to work. WDYT @sodabrew?

sodabrew commented 9 years ago

Like reel ~> 0.5.0 because 0.6.0 is a problem? Seems reasonable for now.

elcuervo commented 9 years ago

@sodabrew yup. That's the plan. I'm not having crashes with 0.6.0.pre5 but 0.5.0 seems a safe bet.

sodabrew commented 9 years ago

+1

elcuervo commented 9 years ago

I'm going to set up the testing environment again so test can be run to a real AppleTV ^_^

elcuervo commented 9 years ago

Version 1.0.5 has just been released. The co-located Apple TV is back online: https://travis-ci.org/elcuervo/airplay

varac commented 8 years ago

hugh, i'm getting this too with reel-0.5.0:

--- modules/site_config ‹dont_remove_nfs_client_on_vagrant› » gem list |grep airplay
airplay (1.0.5)
airplay-cli (1.0.3)
--- modules/site_config ‹dont_remove_nfs_client_on_vagrant› » /usr/bin/ruby --version
ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu]
--- modules/site_config ‹dont_remove_nfs_client_on_vagrant› » air list               
I, [2015-12-12T22:47:07.967663 #28095]  INFO -- : Celluloid 0.17.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
/var/lib/gems/2.1.0/gems/reel-0.5.0/lib/reel/response.rb:10:in `<class:Response>': uninitialized constant HTTP::Response::STATUS_CODES (NameError)
    from /var/lib/gems/2.1.0/gems/reel-0.5.0/lib/reel/response.rb:4:in `<module:Reel>'
    from /var/lib/gems/2.1.0/gems/reel-0.5.0/lib/reel/response.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/reel-0.5.0/lib/reel.rb:12:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/reel-rack-0.2.2/lib/reel/rack/server.rb:3:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/reel-rack-0.2.2/lib/rack/handler/reel.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/reel-rack-0.2.2/lib/reel/rack.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/server.rb:4:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/player.rb:8:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/playable.rb:1:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/device.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/devices.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/browser.rb:5:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-1.0.5/lib/airplay/cli.rb:2:in `<top (required)>'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
    from /var/lib/gems/2.1.0/gems/airplay-cli-1.0.3/bin/air:4:in `<top (required)>'
    from /usr/local/bin/air:23:in `load'
    from /usr/local/bin/air:23:in `<main>'
erawhctim commented 8 years ago

@elcuervo, Same issue here as @varac above ^ (airplay-cli v1.0.3, ruby v2.0, reel 0.5.0)

koraktor commented 8 years ago

A fix for this is enforcing to use a pre-1.0 version of http.

gem 'http', '< 1.0'

The real fix must be done in reel-rack though.

tfitts commented 8 years ago

I'm getting the same issue with reel 0.5.0 and ruby 2.2.2 and 2.2.3 and airplay-cli 1.0.3/airplay 1.0.5. Any other ideas for a fix? I've also tried adding gem 'http', '< 1.0' in the gemfile for airplay. This is on OSX 10.11.2.

elcuervo commented 8 years ago

I'm planning on removing Celluloid so hang on tight :)

ekristen commented 8 years ago

Any progress?

philfreo commented 8 years ago

I also just tried to install and am getting this error on ruby 2.2.4 and reel 0.5.0

elcuervo commented 8 years ago

I'll be working on the new version this week. Sorry for the delay but life took over for a while.

tmm1 commented 8 years ago

Any updates?

elcuervo commented 8 years ago

Getting there. I got access to an apple tv for testing and I'm a few hours of work away from completely removing Celluloid from the mix

elcuervo commented 8 years ago

93 will be ready sooner than later.