core: Unifi Network will not connect - 404 Not Found message
The problem
I updated to 2022.7.0 and the integration will not connect anymore. Deleted integration , restarted HA , added ,same. Receiving Unknown error and sometimes both unknow and cannot connect. I am using a local user only. Last version to work 2022.6.4 Unifi Protect Integration works fine.
UniFi OS UDM Pro 1.12.22 Network 7.1.66
Please see logs.
What version of Home Assistant Core has the issue?
2022.7.0
What was the last working version of Home Assistant Core?
2022.6.4
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Unifi Network
Link to integration documentation on our website
https://www.home-assistant.io/integrations/unifi
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: aiohttp.server
Source: components/unifi/config_flow.py:112
First occurred: 3:40:54 PM (6 occurrences)
Last logged: 4:00:18 PM
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 177, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 109, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 277, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 112, in async_step_user
sites = await controller.sites()
File "/usr/local/lib/python3.10/site-packages/aiounifi/controller.py", line 148, in sites
sites = await self.request("get", url=url)
File "/usr/local/lib/python3.10/site-packages/aiounifi/controller.py", line 287, in request
return await self._request(method, url, json)
File "/usr/local/lib/python3.10/site-packages/aiounifi/controller.py", line 326, in _request
raise ResponseError(f"Call {url} received 404 Not Found")
aiounifi.errors.ResponseError: Call https://192.168.0.1:443/proxy/network/api/self/sites received 404 Not Found
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 40 (11 by maintainers)
Hard Power cycle the UDM-Pro (Unplug the power cable) seems to fix the issue in majority of the cases. Console reboots or soft shutdowns do not. We will monitor at future upgrades .
There are no leads on how to solve this in the code ATM, the only solution people have brought up so far is to restart their UniFi system.
This is the issue with reverse engineering APIs
I can’t explain anything, but it seems to be running again for me now. A number of reboots, tinkering and unexplained magic has got stuff going again. Successfully upgraded my production instance without issue. Appreciate the support @Kane610
After I unplugged the UDM -Pro while running and plugged it back in the integration now works.
Multiple previous console restarts did nothing.
Obviously a backup is recommended before going down that path.
The network was working just fine so likely an issue with the actual network application on the Unifi console.
From: @.*** @.> Sent: July 8, 2022 11:08 AM To: ‘home-assistant/core’ @.>; ‘home-assistant/core’ @.> Cc: ‘Author’ @.> Subject: RE: [home-assistant/core] Unifi Network will not connect (Issue #74547)
I added the debug lines to the configurational .upgraded to 7.1 , restart but I am still not getting any more details logs than before.
please see attached.
Error is still unknown error with a 404 not found
I there anywhere else I need to go to get more detailed logs ?
From: Robert Svensson @.*** @.> > Sent: July 7, 2022 2:19 PM To: home-assistant/core @. @.> > Cc: bluestar888 @. @.> >; Author @. @.***> > Subject: Re: [home-assistant/core] Unifi Network will not connect (Issue #74547)
What is needed right now are debug logs in 2022.7 with unifi os and controller upgraded to latest stable
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/74547#issuecomment-1178243203 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AWEH4R5XBKSSMD2664CEJL3VS5CVJANCNFSM523NIZGA . You are receiving this because you authored the thread.Message ID: @.*** @.***> >
– This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus