Giter Club home page Giter Club logo

Comments (15)

CriticalSource avatar CriticalSource commented on July 17, 2024 1

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.

from core.

JohnKiller avatar JohnKiller commented on July 17, 2024 1

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

from core.

Kane610 avatar Kane610 commented on July 17, 2024 1

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.

from core.

home-assistant avatar home-assistant commented on July 17, 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)

from core.

RobertAmour avatar RobertAmour commented on July 17, 2024

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'

from core.

tjoll avatar tjoll commented on July 17, 2024

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

from core.

defuncio avatar defuncio commented on July 17, 2024

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

from core.

sachinss123 avatar sachinss123 commented on July 17, 2024

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.

from core.

viseniv avatar viseniv commented on July 17, 2024

Same issue form me with local user

from core.

RobertAmour avatar RobertAmour commented on July 17, 2024

Still broken in 2024.6.3

from core.

JohnKiller avatar JohnKiller commented on July 17, 2024

Issue introduced by #117457

from core.

brunohenriquy avatar brunohenriquy commented on July 17, 2024

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!

from core.

Kane610 avatar Kane610 commented on July 17, 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

from core.

Kane610 avatar Kane610 commented on July 17, 2024

This has been fixed

from core.

sachinss123 avatar sachinss123 commented on July 17, 2024

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

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.