⚡ Sangsakala Proxy 🏠 Home
Skip to content

Unreliable discovery on iOS #1196

Open
Open

Description

@jpan127

Hi, I realize iOS is probably not officially supported and this is a long shot.

I'm using Pythonista on iOS to run a discovery script with zeroconf 0.71.0. The code is slightly modified from the README example (but the modifications are irrelevant). I have both a Windows and MacOS machine advertising separate services on a home network.

I'm observing results all over the place. At least 9/10 times my advertised services are not discovered (I added a 120 second timeout). I have observed a handful of times it is able to discover it. It's not obvious to me why it's sporadic.

Debugging

I enabled debug logging and in all runs (discoverable or not) there are these errors:

DEBUG:zeroconf:Error with socket 8 (('192.168.86.39', 5353))): [Errno 65] No route to host
Traceback (most recent call last):
  File "/var/containers/Bundle/Application/{UUID}/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/asyncio/selector_events.py", line 1054, in sendto
    self._sock.sendto(data, addr)
OSError: [Errno 65] No route to host

Testing the Windows + MacOS communicating with each other works flawlessly though.

I also tried using an iOS app, HE.NET Network Tools, which also does some service discovery with Bonjour, and it discovered my advertised services consistently.

Not sure how relevant this is but I printed out zeroconf.cache.names() after 120 seconds of discovery, and the results are surprisingly different almost every time. I have maybe 2 dozen discoverable services (apple devices, TVs, etc), and they aren't consistently discovered. However running the discovery script on a computer is perfectly consistent.

So it sounds like either there's some networking issue with Pythonista, or a discrepancy in implementation between zeroconf and iOS' bonjour. Would anyone have any ideas on how to debug further? Thanks!!

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions