postlund/pyatv

MDNS lookup Error

Opened this issue · 1 comments

What to investigate?

I have an AppleTV in my network. It used to work fine up until a few weeks ago (I guess after an update of the AppleTV). Now, it gives me a bunch of MDNS lookup errors before it finally finds it. But this behavior produces error in the rest of my code, and i would like to find out the root cause of this, rather than trying to adjust my code.

When i scan for the atv, i get:

DEBUG:pyatv.support.net:Binding on *:5353
DEBUG:pyatv.support.net:Binding on 127.0.0.1:0
DEBUG:pyatv.support.net:Binding on 192.168.0.86:0
DEBUG:pyatv.support.net:Binding on 192.168.0.107:0
DEBUG:pyatv.support.net:Binding on 10.127.213.1:0
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.mdns:Error during MDNS lookup: [Errno 126] Required key not available
DEBUG:pyatv.core.scan:Auto-discovered

(There is more, but i don't know how sensitive this info is, and would rather leave it out if possible. I can of course add the relevant Info, if needed)

At this point, the AppleTV was found in the network with the necessary protocols, and i can use it then in the script.

I'm running this script on a raspberry pi, with PiOS Debian GNU/Linux 12 (bookworm)
pyatv version 14.5
python version 3.12.0

I would appreciate a pointer to the right direction, where to look, because i can't really find much on this atm, other than this other investigation, that got magically fixed.

Expected outcome

connecting with the AppleTV without getting MDNS lookup errors.

That'a a bit odd, not sure what the root cause is. Can you re-run with --mdns-debug?