airplay
airplay copied to clipboard
Can't get it work on Debian 10 Buster
Hi, I like this project and is very good but I'm unable to use it. I already had to downgrade gem to 3.0.6, install rake and use the http v0.9.9 but I still have problems. Are there any alternatives that you know? It's sad but it's not being updated from years now and nobody even switched from Celluloid to something else.
BTW this is what I get, hope you know how to fix it:
$ air list
I, [2020-01-17T18:38:23.102700 #6184] INFO -- : Celluloid 0.17.4 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
/var/lib/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/browser.rb:24: warning: Object#timeout is deprecated, use Timeout.timeout instead.
/var/lib/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/configuration.rb:29: warning: constant ::Fixnum is deprecated
#<Thread:0x0000558e8d0bb640@/var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
6: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96:in "block (2 levels) in async_each"
5: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in "each"
4: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in "each"
3: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in "block in each"
2: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96:in "block (3 levels) in async_each"
1: from /var/lib/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd.rb:136:in "block in resolve"
/var/lib/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/browser.rb:132:in "block in resolve": break from proc-closure (LocalJumpError)
i hava the same issue on macOS Cataline,
System info: version 10.15.3
noah-normal@MacBook-Pro-2:~ $ air list
I, [2020-04-07T09:50:53.825136 #3207] INFO -- : Celluloid 0.17.4 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
Traceback (most recent call last):
43: from /usr/local/bin/air:23:in `<main>'
42: from /usr/local/bin/air:23:in `load'
41: from /Library/Ruby/Gems/2.6.0/gems/airplay-cli-1.0.3/bin/air:4:in `<top (required)>'
40: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
39: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
38: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/cli.rb:2:in `<top (required)>'
37: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
36: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
35: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay.rb:2:in `<top (required)>'
34: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
33: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
32: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/browser.rb:5:in `<top (required)>'
31: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
30: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
29: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/devices.rb:2:in `<top (required)>'
28: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
27: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
26: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/device.rb:2:in `<top (required)>'
25: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
24: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
23: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/playable.rb:1:in `<top (required)>'
22: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
21: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
20: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/player.rb:8:in `<top (required)>'
19: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
18: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
17: from /Library/Ruby/Gems/2.6.0/gems/airplay-1.0.5/lib/airplay/server.rb:4:in `<top (required)>'
16: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
15: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
14: from /Library/Ruby/Gems/2.6.0/gems/reel-rack-0.2.3/lib/reel/rack.rb:2:in `<top (required)>'
13: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
12: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
11: from /Library/Ruby/Gems/2.6.0/gems/reel-rack-0.2.3/lib/rack/handler/reel.rb:1:in `<top (required)>'
10: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
9: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
8: from /Library/Ruby/Gems/2.6.0/gems/reel-rack-0.2.3/lib/reel/rack/server.rb:3:in `<top (required)>'
7: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
6: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
5: from /Library/Ruby/Gems/2.6.0/gems/reel-0.5.0/lib/reel.rb:12:in `<top (required)>'
4: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
3: from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:72:in `require'
2: from /Library/Ruby/Gems/2.6.0/gems/reel-0.5.0/lib/reel/response.rb:3:in `<top (required)>'
1: from /Library/Ruby/Gems/2.6.0/gems/reel-0.5.0/lib/reel/response.rb:4:in `<module:Reel>'
/Library/Ruby/Gems/2.6.0/gems/reel-0.5.0/lib/reel/response.rb:10:in `<class:Response>': uninitialized constant HTTP::Response::STATUS_CODES (NameError)```
I get the very same thing on my openSUSE 15.0.
quartermaster@Luis5:/usr/lib64/ruby/gems/2.5.0/gems/airplay-cli-1.0.3/bin> ./air list
I, [2020-11-21T19:11:37.841633 #19177] INFO -- : Celluloid 0.17.4 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
/usr/lib64/ruby/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/browser.rb:24: warning: Object#timeout is deprecated, use Timeout.timeout instead.
/usr/lib64/ruby/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/configuration.rb:29: warning: constant ::Fixnum is deprecated
#<Thread:0x0000561161c6ecd8@/usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
6: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96:in `block (2 levels) in async_each'
5: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in `each'
4: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in `each'
3: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:87:in `block in each'
2: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd/service.rb:96:in `block (3 levels) in async_each'
1: from /usr/lib64/ruby/gems/2.5.0/gems/dnssd-3.0.1/lib/dnssd.rb:136:in `block in resolve'
/usr/lib64/ruby/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/browser.rb:132:in `block in resolve': break from proc-closure (LocalJumpError)
Don't worry about the ./
before the command, I do this because of another issue I have, which is that typing just air list
simply gets me an error from my system that the command was non-existent. This is, like I said, an error of my system tho.
Edit: I have the very same error as @serniko97 , what @Gnoah89 had was a little different.
Umm, actually, @Gnoah89 ,your Error is quite different from the one @serniko97 and I are experiencing, and it's easy to fix, too. You need to downgrade one specific gem, as you can see here, and after that you are going to receive one error less. The one that we have tho is still standing and will probably stay with you too. Here is the Code for @Gnoah89
quartermaster@Luis5:/usr/lib64/ruby/gems/2.5.0/gems/airplay-cli-1.0.3/bin> sudo gem uninstall http
[sudo] Passwort für root:
You have requested to uninstall the gem:
http-5.0.0.pre3
reel-0.5.0 depends on http (>= 0.6.0.pre)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN] y
Successfully uninstalled http-5.0.0.pre3
quartermaster@Luis5:/usr/lib64/ruby/gems/2.5.0/gems/airplay-cli-1.0.3/bin> sudo gem install http -v 0.9.9
Fetching: http-form_data-1.0.3.gem (100%)
Successfully installed http-form_data-1.0.3
Fetching: http-0.9.9.gem (100%)
Successfully installed http-0.9.9
Parsing documentation for http-form_data-1.0.3
Installing ri documentation for http-form_data-1.0.3
Parsing documentation for http-0.9.9
Installing ri documentation for http-0.9.9
Done installing documentation for http-form_data, http after 0 seconds
2 gems installed
Ok, now here we go, I have a very bad semi-solution, which has the gem working sometimes (I still have to find out when). What I did was to add a line containig raise StopIteration
to the browser.rb
which is located in /usr/lib64/ruby/gems/2.5.0/gems/airplay-1.0.5/lib/airplay/
on most linux systems, so here is how the lines 130 et sqq. looked like before
def resolve(node)
DNSSD.resolve(node) do |resolved|
break unless node_resolver(node, resolved)
end
end
end
end
and afterwards
def resolve(node)
DNSSD.resolve(node) do |resolved|
raise StopIteration
break unless node_resolver(node, resolved)
end
end
end
end
.
As I said, this is a very bad semi-solution though, because it doesn't always work. It works a few times, but then again not. If you try it in the next morning, it will work a few times again, and then start the whole spiel all over again. I think this is due to a stack overflow, which resets at midnight, but I don't have any evidence regarding that one. What I did not try yet is if it actually finds the appleTVs in the network, since I don't own one and use them in School for teaching, but at least the errors in air list
are gone. I still get an error in air doctor
, but that is a different problem.