Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in dnssd #75

Open
tazjin opened this issue Feb 2, 2014 · 4 comments
Open

Crash in dnssd #75

tazjin opened this issue Feb 2, 2014 · 4 comments
Assignees

Comments

@tazjin
Copy link

tazjin commented Feb 2, 2014

Hej!

When I try to run any airplay-cli command (e.g. air list) I get an immediate crash in dnssd.

> air list
D, [2014-02-02T15:07:18.330339 #13842] DEBUG -- : Terminating 4 actors...
/home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd/service.rb:64:in `_browse': DNSSD operation failed with unrecognized error code: -65537 (DNSSD::UnknownError)
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd/service.rb:64:in `browse'
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd.rb:86:in `browse!'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-1.0.2/lib/airplay/browser.rb:25:in `block in browse'
    from /usr/lib/ruby/2.1.0/timeout.rb:82:in `block in timeout'
    from /usr/lib/ruby/2.1.0/timeout.rb:70:in `catch'
    from /usr/lib/ruby/2.1.0/timeout.rb:70:in `timeout'
    from /usr/lib/ruby/2.1.0/timeout.rb:111:in `timeout'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-1.0.2/lib/airplay/browser.rb:24:in `browse'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-1.0.2/lib/airplay.rb:34:in `browse'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-1.0.2/lib/airplay.rb:62:in `devices'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-1.0.2/lib/airplay/cli.rb:46:in `list'
    from /home/vincent/.gem/ruby/2.1.0/gems/clap-1.0.0/lib/clap.rb:35:in `call'
    from /home/vincent/.gem/ruby/2.1.0/gems/clap-1.0.0/lib/clap.rb:35:in `run'
    from /home/vincent/.gem/ruby/2.1.0/gems/clap-1.0.0/lib/clap.rb:6:in `run'
    from /home/vincent/.gem/ruby/2.1.0/gems/airplay-cli-1.0.1/bin/air:8:in `<top (required)>'
    from /home/vincent/bin/air:23:in `load'
    from /home/vincent/bin/air:23:in `<main>'

Bonjour service discovery through something like avahi-discover-standalone works fine:
bonjour

This could be related to this issue in dnssd which seems to have the same error code, and this issue in this project. There doesn't seem to be a dot in any of the result names though.

Cheers,
Vincent

@ghost ghost assigned elcuervo Feb 2, 2014
@elcuervo
Copy link
Owner

elcuervo commented Feb 2, 2014

Thank you for reporting the issue. I'm looking at it now. I will update shortly :)

@tazjin
Copy link
Author

tazjin commented Feb 3, 2014

On further investigation this happens to me with just DNSSD as well:

~/s/a/l/airplay $ irb
irb(main):001:0> require "dnssd"
=> true
irb(main):002:0> DNSSD.browse!("_airplay._tcp.")
DNSSD::UnknownError: DNSSD operation failed with unrecognized error code: -65537
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd/service.rb:64:in `_browse'
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd/service.rb:64:in `browse'
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
    from /home/vincent/.gem/ruby/2.1.0/gems/dnssd-2.0/lib/dnssd.rb:86:in `browse!'
    from (irb):2
    from /usr/bin/irb:11:in `<main>'

So it's most likely not related to this library. I might file this against dnssd itself.

//V

@elcuervo
Copy link
Owner

elcuervo commented Feb 3, 2014

If you add the issue please cross reference it to this issue. I'll also work in a fix

@Aesthetikx
Copy link
Contributor

As an anecdote, on FreeBSD I was seeing this error as well, but after reading this: https://www.mythtv.org/wiki/AirTunes/AirPlay#Not_seeing_AirPlay_device_in_iTunes it turns out that DNSSerivceBrowse returns -65537 when the avahi daemon is not running, so this was fixed by starting the avahi-daemon service. Not sure why it wouldn't return kDNSServiceErr_ServiceNotRunning instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants