glances icon indicating copy to clipboard operation
glances copied to clipboard

Zeroconf 0.18.0 or higher do not work anymore (autodiscovery.py)

Open nicolargo opened this issue 4 years ago • 1 comments

Install zeroconf 0.18.0 or higher:

2021-06-19 08:43:46,357 -- INFO -- Start Glances 3.2.0b3
2021-06-19 08:43:46,357 -- INFO -- CPython 3.8.5 and psutil 5.8.0 detected
2021-06-19 08:43:46,365 -- INFO -- Read configuration file './conf/glances.conf'
2021-06-19 08:43:46,393 -- INFO -- Start GlancesServer mode
2021-06-19 08:43:46,410 -- WARNING -- Wifi lib is not compliant with Python 3, Wifi plugin is disabled
2021-06-19 08:43:47,454 -- WARNING -- Choked at offset 104 while unpacking b'\x00\x00\x84\x00\x00\x00\x00\x04\x00\x00\x00\x00\x08_glances\x04_tcp\x05local\x00\x00\x0c\x00\x01\x00\x00\x11\x94\x00\x13\x10XPS13-9333:61209\xc0\x0c\xc0+\x00!\x80\x01\x00\x00\x00x\x00\x12\x00\x00\x00\x00\xef\x19\nXPS13-9333\x00\xc0+\x00\x10\x80\x01\x00\x00\x11\x94\x00\x00\xc0O\x00\x01\x80\x01\x00\x00\x00x\x00\x04\xc0\xa8\x001'
Traceback (most recent call last):
  File "/home/nicolargo/dev/glances/venv/lib/python3.8/site-packages/zeroconf/__init__.py", line 754, in __init__
    self.read_others()
  File "/home/nicolargo/dev/glances/venv/lib/python3.8/site-packages/zeroconf/__init__.py", line 825, in read_others
    domain = self.read_name()
  File "/home/nicolargo/dev/glances/venv/lib/python3.8/site-packages/zeroconf/__init__.py", line 902, in read_name
    raise IncomingDecodeError("Bad domain name at %s" % (off,))
zeroconf.IncomingDecodeError: Bad domain name at 106

nicolargo avatar Jun 19 '21 06:06 nicolargo

Strange because no error message with:

./venv/bin/python
Python 3.8.5 (default, Jan 27 2021, 15:41:15) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zeroconf
>>> zeroconf.__version__
'0.31.0'
>>> si = zeroconf.ServiceInfo('_glances._tcp.local.', 'XPS13-9333:61209._glances._tcp.local.', addresses=[b'\xc0\xa8\x001'], port=61209, server='XPS13-9333')
>>> zc = zeroconf.Zeroconf()
>>> zc.register_service(si)

nicolargo avatar Jun 20 '21 06:06 nicolargo

Not reproduced anymore in Glances 3.3.0 (zeroconf==0.39.1)

nicolargo avatar Sep 11 '22 16:09 nicolargo