python-tailscale
python-tailscale copied to clipboard
`devices()` raises `InvalidFieldValue` exception because `hair_pinning` is missing from `ClientSupports`
Exception:
mashumaro.exceptions.InvalidFieldValue: Field "devices" of type dict[str, Device] in Devices has invalid value {'...': {..., 'clientSupports': {'ipv6': False, 'pcp': False, 'pmp': False, 'udp': True, 'upnp': False}}, ... }
caused by:
mashumaro.exceptions.MissingField: Field "hair_pinning" of type Optional[bool] is missing in ClientSupports instance
This started happening today. I haven’t checked yet if this key is gone from the API entirely or if it’s just missing from some devices.
Looks like this is because Home Assistant’s Tailscale integration expects the Admin API response shaped like:
{ "devices": [ { ...Device... }, { ... } ] }
But the v2 API response is now:
{ "<some_id>": { ... }, "<some_id>": { ... }, ... }
Yeah, I think the API is "just" broken, doesn't follow the spec.
I've tried to create a ticket at https://tailscale.com/contact/support, but it is impossible to get through their AI bullshit generator, so filed a GH issue at https://github.com/tailscale/tailscale/issues/17853
They will process it within this decade, keep calm...