core: Error while setting up tailscale integration
The problem
When setting up the integration, I get ‘unknown error occurred’ I set up with my mail address as tailnet, and a newly generated API Key
This is the log output:
Logger: aiohttp.server
Source: components/tailscale/config_flow.py:26
First occurred: 7:11:03 PM (2 occurrences)
Last logged: 7:25:18 PM
Error handling request
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/forwarded.py", line 98, in forwarded_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/ban.py", line 78, in ban_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/auth.py", line 181, in auth_middleware
return await handler(request)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/config/config_entries.py", line 157, in post
return await super().post(request, flow_id)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 252, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/tailscale/config_flow.py", line 44, in async_step_user
await validate_input(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/tailscale/config_flow.py", line 26, in validate_input
await tailscale.devices()
File "/srv/homeassistant/lib/python3.9/site-packages/tailscale/tailscale.py", line 115, in devices
return Devices.parse_obj(data).devices
File "pydantic/main.py", line 578, in pydantic.main.BaseModel.parse_obj
File "pydantic/main.py", line 406, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for Devices
devices -> 50052 -> created
invalid datetime format (type=value_error.datetime)
What version of Home Assistant Core has the issue?
core-2021.12.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Tailscale
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tailscale/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 7
- Comments: 19 (10 by maintainers)
@frenck Just tested with 2021.12.4: works like a charm, even with the ‘hello’ device Thank you! It looks like a great integration!
Removing the “hello” device from my tailscale account fixes/workaround the issue.
Extract from my list of devices. The issue is with the “hello” service, which has a blank “created” date. All the reports have the same “50052” id.
All my other devices seem to have a proper date.
I still have the same “unknown error occurred” after upgrading to 2021.12.2.
@frenck I just upgraded to 2021.12.2, and tried to install the integration… but it gives the same error, with the exact same stacktrace as above (including linenumbers) I saw something about tailscale in de changelogs, so I assumed something changed… did I miss something?
@timconinx Thanks for reporting this one. The problem is that the Tailscale API specification isn’t clear on what to expect for all fields. So, for the initial build, I’ve kept it rather strict.
I’ll lose the type strictness of these fields and create a patch for it.
@mefisto22 If you come across an issue, anywhere on GitHub, and you want to express you have the same issue; Add an 👍 to the issue instead of responding “I have the same issue”, Thanks 👍