FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Zeroconf in exe file · Issue #276 · python-zeroconf/python-zeroconf · GitHub

Repository navigation

Zeroconf in exe file #276

Closed
Closed

Description

Hi,

I would like to distribute an application with zeroconf include. I can build the the exe (using cx_freeze or pyinstaller).
When I run the exe the zeroconf software does not give any callabacks about founded services while they are founded if I don't use the exe. In both cases I can make a connection to my devices, so the exe has network permissions.

Any ideas that I could test as I don't get any errors?

zerconf: v0.27.1
python: 3.7.4

Thanks!

Activity

  1. jstasiak commented on Jun 12, 2020

    Collaborator

    My vague guess would be something about Windows limiting what that particular binary can network-wise do as opposed to python.exe (even though you can connect to your devices directly, yes). Can you set the zeroconf logger level to debug and post the complete output of the zeroconf logger both from the exe file you bould and from the version running "normally"? The package deliberately ignores some error conditions (with logging informing about it) because they're usually ok to ignore, may be something related to this.

  2. KoenVda88 commented on Jun 12, 2020

    Author

    log zeroconfig in debug.txt

    here is a log file hope you can make sence of it as I can't spot a difference with the python.exe run.

    I look for the service __ak-platform._tcp.local normally you need to see a device M_flex6hp-c0-0-3c_FLEX6HP with ip 169.254.1.2 this is the device I can find in the normal run. but out here It's not in the log

  3. jstasiak commented on Jun 12, 2020

    Collaborator

    Thanks. Does that file contain both logs from an application run using python.exe and from the exe version? It seems like the logs come from a single run of a single application. (there are some logging errors but they're not important, I'll fix them in master).

    PS. It'd be cool if there were timestamps in the logs, but it's probably fine without them.

  4. KoenVda88 commented on Jun 12, 2020

    Author

    log zeroconfig in debug with exe in other folder.txt
    log zeroconfig in debug with python.txt
    log zeroconfig in debug with exe in dist folder.txt

    Now the strangest thing happened, I was preparing some better logging files for you and in the process I run my .exe file outside the <prj_dir>/dist folder which is the standard output folder for pyinstaller.
    And now there is no problem anymore. you can check it out in the 3 log files.

    I did change the service to _netaudio-arc._udp.local. just because I'm 100% sure this device is working perfect. And I run the standard example so you will have an out like:
    Service FLEX6HP-C0-0-3C._netaudio-arc._udp.local. added, service info: ServiceInfo(type='_netaudio-arc._udp.local.', name='FLEX6HP-C0-0-3C._netaudio-arc._udp.local.', addresses=[b'\xa9\xfe\xbcR'], port=4440, weight=0, priority=0, server='AK-9252bb.local.', properties={b'arcp_vers': b'2.7.41', b'arcp_min': b'0.2.4', b'router_vers': b'4.0.2', b'router_info': b'ULTIMOX4', b'mf': b'GSFSono', b'model': b'_0000000000000001'})
    if the device is found

  5. jstasiak commented on Jun 13, 2020

    Collaborator

    Thank you, that's thorough and helpful. Hah, yes, very interesting. I haven't used Windows for a while but my intuition would be that there's some multicast/mDNS firewall filtering or some other security mechanism involved in case of the original location of that exe file. Queries are sent seemingly successfully but no answers are ever received so I think sending data is being blocked. Receiving data seems to be working fine, as in the case of exe in the dist directory there are some query packets being received:

    2020-06-12 23:12:58 DEBUG    Received from '169.254.214.163':5353 (socket 612): <DNSIncoming:{id=0, flags=0, n_q=1, n_ans=0, n_auth=0, n_add=0, questions=[question[a,in,GSF-SERVER2.local.]], answers=[]}> (35 bytes) as [b'\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x0bGSF-SERVER2\x05local\x00\x00\x01\x00\x01']
    

    This may be an issue the library can do nothing about as it doesn't see any errors but I can't say for sure without understanding the mechanism that's responsible for this – maybe we can work around that somehow. Wireshark capture of all network traffic of those processes to/from UDP port 5353 could shed some light on this but not sure how much.

  6. KoenVda88 commented on Jun 15, 2020

    Author

    With Wireshark it looks indeed like there is no packet sending for some strange reason. I have no clue why but it will probably not be in the library.

    Thanks for the help and the contrition to Zeroconf, great package :)

  7. jstasiak commented on Jun 15, 2020

    Collaborator

    Thanks for the nice words, it's good to see the project used and useful. :) And thank you for all the extra information as well. If you ever find out what caused this pleases let us know even if just to satisfy my curiosity.

    Edit: Seems like I can close this issue now.

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


      Back | FazBrowse Home | New Git URL