Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling request - config_entry.runtime_data #119159

Closed
CriticalSource opened this issue Jun 8, 2024 · 21 comments · Fixed by #121725
Closed

Error handling request - config_entry.runtime_data #119159

CriticalSource opened this issue Jun 8, 2024 · 21 comments · Fixed by #121725
Assignees

Comments

@CriticalSource
Copy link

The problem

I can no longer re-authenticate myself. I always get the error “Unknown error occurred” ( even though the login worked according to the logs).

What version of Home Assistant Core has the issue?

core-2024.6.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

Unifi

Link to integration documentation on our website

No response

Diagnostics information

2024-06-08 20:56:08.350 DEBUG (MainThread) [aiounifi.interfaces.connectivity] sending (to https://172.172.172.139:8443) get, None, {'allow_redirects': False}
2024-06-08 20:56:08.362 DEBUG (MainThread) [aiounifi.interfaces.connectivity] received (from https://172.172.172.139:8443) 302 application/octet-stream <ClientResponse(https://172.172.172.139:8443) [302 None]>
<CIMultiDictProxy('Location': '/manage', 'Content-Length': '0', 'Date': 'Sat, 08 Jun 2024 18:56:07 GMT')>

2024-06-08 20:56:08.362 DEBUG (MainThread) [aiounifi.interfaces.connectivity] data (from https://172.172.172.139:8443) b''
2024-06-08 20:56:08.362 DEBUG (MainThread) [aiounifi.interfaces.connectivity] Talking to UniFi OS device: False
2024-06-08 20:56:08.362 DEBUG (MainThread) [aiounifi.interfaces.connectivity] sending (to https://172.172.172.139:8443/api/login) post, {'username': 'xxxx', 'password': 'xxx', 'rememberMe': True}, {}
2024-06-08 20:56:09.770 DEBUG (MainThread) [aiounifi.interfaces.connectivity] received (from https://172.172.172.139:8443/api/login) 200 application/json <ClientResponse(https://172.172.172.139:8443/api/login) [200 None]>
<CIMultiDictProxy('Vary': 'Origin', 'Set-Cookie': 'unifises=xxx; Path=/; Secure; HttpOnly', 'Set-Cookie': 'csrf_token=xxx; Path=/; Secure', 'X-Frame-Options': 'DENY', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '30', 'Date': 'Sat, 08 Jun 2024 18:56:09 GMT')>

2024-06-08 20:56:09.771 DEBUG (MainThread) [aiounifi.interfaces.connectivity] data (from https://172.172.172.139:8443/api/login) b'{"meta":{"rc":"ok"},"data":[]}'
2024-06-08 20:56:09.771 DEBUG (MainThread) [aiounifi.interfaces.connectivity] Logged in to UniFi https://172.172.172.139:8443/api/login
2024-06-08 20:56:09.771 DEBUG (MainThread) [aiounifi.interfaces.connectivity] sending (to https://172.172.172.139:8443/api/self/sites) get, None, {}
2024-06-08 20:56:09.773 DEBUG (MainThread) [aiounifi.interfaces.connectivity] received (from https://172.172.172.139:8443/api/self/sites) 200 application/json <ClientResponse(https://172.172.172.139:8443/api/self/sites) [200 None]>
<CIMultiDictProxy('Vary': 'Origin', 'X-Frame-Options': 'DENY', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '233', 'Date': 'Sat, 08 Jun 2024 18:56:09 GMT')>

2024-06-08 20:56:09.774 DEBUG (MainThread) [aiounifi.interfaces.connectivity] data (from https://172.172.172.139:8443/api/self/sites) b'{"meta":{"rc":"ok"},"data":[{"anonymous_id":"xxx","name":"default","_id":"xxx","attr_no_delete":true,"attr_hidden_id":"default","desc":"Default","role":"admin","device_count":5}]}'
2024-06-08 20:56:09.774 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 70, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 124, in async_step_user
    return await self.async_step_site(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 167, in async_step_site
    hub = config_entry.runtime_data
          ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntry' object has no attribute 'runtime_data'

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Jun 8, 2024

Hey there @Kane610, mind taking a look at this issue as it has been labeled with an integration (unifi) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of unifi can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign unifi Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


unifi documentation
unifi source
(message by IssueLinks)

@RobertAmour
Copy link

I have the same issue

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 19:07:40 (2 occurrences)
Last logged: 19:11:10

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 70, in wrapper
return await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 414, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 124, in async_step_user
return await self.async_step_site(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 167, in async_step_site
hub = config_entry.runtime_data
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntry' object has no attribute 'runtime_data'

@tjoll
Copy link

tjoll commented Jun 13, 2024

I've got the same issue since the upgrade to 2024.6. Error messages in the debug files are the same.

@defuncio
Copy link

Same issue. Just updated HomeAssistant to 2024.6.2 und Unifi Network to 8.2.93
Unknown Error.

@sachinss123
Copy link

I can also confirm I have the same issue. It started when I turned on 2FA (which is anyway going to be enforced from next month). I created a local user, but even for that user I keep getting the above error.

@viseniv
Copy link

viseniv commented Jun 16, 2024

Same issue form me with local user

@RobertAmour
Copy link

Still broken in 2024.6.3

@CriticalSource
Copy link
Author

I have a workaround, but I don't know if there are any side effects.

You have to adjust the following file:
/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py
Change Line 167 to:

try:
    hub = config_entry.runtime_data
except AttributeError:
    hub = None

Restart HomeAssistent and the re-authentication should work again.

@JohnKiller
Copy link

Issue introduced by #117457

@JohnKiller
Copy link

For me, removing the integration and reconfiguring from scratch solved the issue. I've lost all my entities, but at least I can use it again

@brunohenriquy
Copy link
Contributor

For me, removing the integration and reconfiguring from scratch solved the issue. I've lost all my entities, but at least I can use it again

This worked for me as well!

@Kane610
Copy link
Member

Kane610 commented Jun 20, 2024

Thanks for providing a fix, dev has been fixed as I rewrote a bunch of tests due to other faulty dependencies in test infrastructure to runtime_data but I didn't consider that things might be faulty on active systems as well

@Kane610
Copy link
Member

Kane610 commented Jun 24, 2024

This has been fixed

@Kane610 Kane610 closed this as completed Jun 24, 2024
@sachinss123
Copy link

Great, thanks! Will it be reflected in next months release?

@Kane610
Copy link
Member

Kane610 commented Jun 24, 2024

I accidentally fixed it reworking tests and that fix will be out with 2024.7. The work around fix suggested in this issue should be available with latest point release.

@RobertAmour
Copy link

Just upgraded to 2024.7.0 Integration broke again, showing same symptoms - Resolved by removing and re-adding integration

Log

Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 20:02:36 (3 occurrences)
Last logged: 21:29:56

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware
response = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin
return await func(self, request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
return await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure
result = await self._async_configure(flow_id, user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 415, in _async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step
result: _FlowResultT = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 125, in async_step_user
return await self.async_step_site(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 171, in async_step_site
hub = config_entry.runtime_data
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ConfigEntry' object has no attribute 'runtime_data'

@Kane610
Copy link
Member

Kane610 commented Jul 4, 2024

Just upgraded to 2024.7.0 Integration broke again, showing same symptoms - Resolved by removing and re-adding integration

Log

Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 First occurred: 20:02:36 (3 occurrences) Last logged: 21:29:56

Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 415, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 125, in async_step_user return await self.async_step_site( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/unifi/config_flow.py", line 171, in async_step_site hub = config_entry.runtime_data ^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ConfigEntry' object has no attribute 'runtime_data'

So how do I replicate this?

@RobertAmour
Copy link

My steps were:-

Upgrade to Core 2024.7.0
Prompted to re-authenticate Unifi Application after HA restarts
Authentication fails in the same way as before.

Resolved issue by removing unifi Application integration and re-adding

@bertramt
Copy link

bertramt commented Jul 8, 2024

Seeing the same "AttributeError: 'ConfigEntry' object has no attribute 'runtime_data'" error. I ran into the issue sometime after upgrading to 2024.7.1 when I changed the password for my homeassistant user in unifi and have been unable to reauthenticate.

I know the password is correct as it gives an "Invalid authentication" error when I try an incorrect password.

@Kane610
Copy link
Member

Kane610 commented Jul 9, 2024

I will try to have a fix out for next release during this week

@Kane610
Copy link
Member

Kane610 commented Jul 10, 2024

New fix merged, lets hope it resolves it

@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.