Title: Regression in unique/shared handling for service browser in 0.24.5? · Issue #236 · python-zeroconf/python-zeroconf · GitHub
Open Graph Title: Regression in unique/shared handling for service browser in 0.24.5? · Issue #236 · python-zeroconf/python-zeroconf
X Title: Regression in unique/shared handling for service browser in 0.24.5? · Issue #236 · python-zeroconf/python-zeroconf
Description: Home Assistant uses zeroconf to detect HomeKit (_hap._tcp.local) devices. Since it was updated to use 0.24.5 we've seen a couple of cases where discovery wasn't behaving correctly. With the help of an affected user we ran browser.py. Thi...
Open Graph Description: Home Assistant uses zeroconf to detect HomeKit (_hap._tcp.local) devices. Since it was updated to use 0.24.5 we've seen a couple of cases where discovery wasn't behaving correctly. With the help of...
X Description: Home Assistant uses zeroconf to detect HomeKit (_hap._tcp.local) devices. Since it was updated to use 0.24.5 we've seen a couple of cases where discovery wasn't behaving correctly. With the...
Opengraph URL: https://github.com/python-zeroconf/python-zeroconf/issues/236
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression in unique/shared handling for service browser in 0.24.5?","articleBody":"Home Assistant uses zeroconf to detect HomeKit (`_hap._tcp.local`) devices. Since it was updated to use 0.24.5 we've seen a couple of cases where discovery wasn't behaving correctly. With the help of an affected user we ran [browser.py](https://github.com/jstasiak/python-zeroconf/blob/master/examples/browser.py). This showed that 0.24.5 without any Home Assistant code triggered the error.\r\n\r\nEventually we discovered that they have devices on their network which have `srv` records that don't set the record as unique, and since #217 was merged this triggers an assertion in `get_service_info`:\r\n\r\n```\r\nException in thread zeroconf-ServiceBrowser__hap._tcp.local.:\r\nTraceback (most recent call last):\r\n File \"/usr/lib/python3.7/threading.py\", line 917, in _bootstrap_inner\r\n self.run()\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 1504, in run\r\n handler(self.zc)\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 1444, in \u003clambda>\r\n zeroconf=zeroconf, service_type=self.type, name=name, state_change=state_change\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 1322, in fire\r\n h(**kwargs)\r\n File \"browser.py\", line 20, in on_service_state_change\r\n info = zeroconf.get_service_info(service_type, name)\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 2191, in get_service_info\r\n if info.request(self, timeout):\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 1762, in request\r\n out.add_answer_at_time(zc.cache.get_by_details(self.name, _TYPE_SRV, _CLASS_IN), now)\r\n File \"/home/pi/homekit-debugging/venv/lib/python3.7/site-packages/zeroconf/__init__.py\", line 907, in add_answer_at_time\r\n assert record.unique\r\nAssertionError\r\n```\r\n\r\nUnplugging these devices allowed things to function normally.\r\n\r\nReverting to 0.24.4 (before #217) also allowed things to function normally.\r\n\r\nIf i understood correctly the check in #217 was for when publishing a zeroconf record? Is it possible to relax/disalbe the check when browsing? As obviously we can't do anything about vendors implementations of things.\r\n\r\nCCing @Neejoh as would not have been able to trace this issue without their devices and @mattsaxon in case you can shed any light on this?\r\n","author":{"url":"https://github.com/Jc2k","@type":"Person","name":"Jc2k"},"datePublished":"2020-03-31T22:03:48Z","url":"https://github.com/python-zeroconf/python-zeroconf/issues/236"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a42ce10a-a78c-708b-27fd-2d518fc1a8e7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2D4:1CE9AC:36F716:49A932:6B0089EE |
| html-safe-nonce | 45af334d68d663bc9cd85fb04cadc35fa895ca82d88a210168e1d53c4de4af5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkQ0OjFDRTlBQzozNkY3MTY6NDlBOTMyOjZCMDA4OUVFIiwidmlzaXRvcl9pZCI6IjczNTA4MDA4OTY4Mjc0MTc0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 820304aa43dcb1c26b1c41b5cdc279265194d77f6ae284686822162f2271ac83 |
| hovercard-subject-tag | issue:591462396 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-zeroconf/python-zeroconf/236/issue_layout |
| twitter:image | https://opengraph.githubassets.com/879148f8217e961c8d4bc8e37237271d4cac685b141eea6505a5099e2e67a83f/python-zeroconf/python-zeroconf/issues/236 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/879148f8217e961c8d4bc8e37237271d4cac685b141eea6505a5099e2e67a83f/python-zeroconf/python-zeroconf/issues/236 |
| og:image:alt | Home Assistant uses zeroconf to detect HomeKit (_hap._tcp.local) devices. Since it was updated to use 0.24.5 we've seen a couple of cases where discovery wasn't behaving correctly. With the help of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Jc2k |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4d3d8e50f02c1d7bf86d5acfa1d3bfe9366abd6528a6b429eb07a168429d2b61 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-zeroconf/python-zeroconf git https://github.com/python-zeroconf/python-zeroconf.git |
| octolytics-dimension-user_id | 120192235 |
| octolytics-dimension-user_login | python-zeroconf |
| octolytics-dimension-repository_id | 21548731 |
| octolytics-dimension-repository_nwo | python-zeroconf/python-zeroconf |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 21548731 |
| octolytics-dimension-repository_network_root_nwo | python-zeroconf/python-zeroconf |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | db758f8e02b8257935fb03edf81a3e76eb3abd11 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width