home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.2k stars 30.23k forks source link

unable to login to after 3.0.22 UNVR update #113971

Closed dbhalla2280 closed 6 months ago

dbhalla2280 commented 6 months ago

The problem

updated to latest protect version 3.0.22 and now im not able to login. see attached error. logs says

DEBUG (MainThread) [pyunifiprotect.api] Authenticated successfully!

image

What version of Home Assistant Core has the issue?

2024.3.1

What was the last working version of Home Assistant Core?

2024.3.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

unifi protect

Link to integration documentation on our website

No response

Diagnostics information

2024-03-21 19:15:41.294 DEBUG (MainThread) [pyunifiprotect.api] Request url: https://192.168.1.236/api/auth/login 2024-03-21 19:15:41.723 DEBUG (MainThread) [pyunifiprotect.api] 200 application/json <ClientResponse(https://192.168.1.236/api/auth/login) [200 OK]> <CIMultiDictProxy('Server': 'nginx', 'Date': 'Thu, 21 Mar 2024 23:15:41 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '6425', 'Connection': 'keep-alive', 'Set-Cookie': 'TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI3NjllYjZjYi04ZDY5LTRmOGUtOGE4Ni04ZDU5M2Q0ZTM0MDIiLCJwYXNzd29yZFJldmlzaW9uIjoxNzExMDYyNTkyLCJpc1JlbWVtYmVyZWQiOmZhbHNlLCJjc3JmVG9rZW4iOiIyNDBjZDJiYS1jNDllLTQzOGEtYTVkMS05Y2RkMjczMmNkMGIiLCJpYXQiOjE3MTEwNjI5NDEsImV4cCI6MTcxMTA3MDE0MSwianRpIjoiYTI0ZTQzZGItMjA3Yy00NjliLTgwODMtNzFjMTJkNmJlNGIwIn0.hPb1y7aagQg0cVKWZWDRfQloblCVMXPmVOJ8_lms3xQ; path=/; expires=Fri, 22 Mar 2024 01:15:41 GMT; samesite=none; secure; httponly', 'x-updated-csrf-token': '240cd2ba-c49e-438a-a5d1-9cdd2732cd0b', 'x-token-expire-time': '1711070141457', 'X-Response-Time': '413ms', 'Access-Control-Allow-Credentials': 'false', 'Access-Control-Expose-Headers': 'Content-Disposition, Content-Range, Filename, Location, Range, Upload-Length, Upload-Offset, X-Connection-Type, X-Csrf-Token, X-File-Id, X-Token-Expire-Time, X-Updated-Csrf-Token', 'Referrer-Policy': 'no-referrer', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-DNS-Prefetch-Control': 'off', 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'X-Csrf-Token': '240cd2ba-c49e-438a-a5d1-9cdd2732cd0b')>

2024-03-21 19:15:41.723 DEBUG (MainThread) [pyunifiprotect.api] Authenticated successfully! 2024-03-21 19:15:41.723 DEBUG (MainThread) [pyunifiprotect.api] Request url: https://192.168.1.236/proxy/protect/api/bootstrap 2024-03-21 19:15:41.871 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 91, 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 25, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle result = await handler(request, request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin return await func(self, request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 197, in post return await super().post(request, flow_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper result = await method(view, request, data, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 111, in post result = await self._flow_mgr.async_configure(flow_id, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 359, in async_configure result = await self._async_configure(flow_id, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 405, in _async_configure result = await self._async_handle_step( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 502, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/unifiprotect/config_flow.py", line 329, in async_step_user nvr_data, errors = await self._async_get_nvr_data(user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/unifiprotect/config_flow.py", line 259, in _async_get_nvr_data bootstrap = await protect.get_bootstrap() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/api.py", line 1009, in get_bootstrap return Bootstrap.from_unifi_dict(**data, api=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 120, in from_unifi_dict data = cls.unifi_dict_to_dict(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/bootstrap.py", line 224, in unifi_dict_to_dict return super().unifi_dict_to_dict(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 369, in unifi_dict_to_dict data[key] = cls._clean_protect_obj_dict( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 311, in _clean_protect_obj_dict items[key] = cls._clean_protect_obj(value, klass, api) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 289, in _clean_protect_obj return klass.unifi_dict_to_dict(data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/user.py", line 170, in unifi_dict_to_dict return super().unifi_dict_to_dict(data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 360, in unifi_dict_to_dict data[key] = cls._clean_protect_obj_list( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 300, in _clean_protect_obj_list items[index] = cls._clean_protect_obj(item, klass, api) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/base.py", line 289, in _clean_protect_obj return klass.unifi_dict_to_dict(data=data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyunifiprotect/data/user.py", line 34, in unifi_dict_to_dict data["nodes"] = [PermissionNode(n) for n in parts[1].split(",")] ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/enum.py", line 744, in call return cls.new(cls, value) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/enum.py", line 1158, in new raise ve_exc ValueError: 'readlive' is not a valid PermissionNode

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

AngellusMortis commented 6 months ago

@balloob @frenck Still not release 2023.3.2. Just going to keep pinging you every time I am pinged. Enjoy.

elupus commented 6 months ago

You werent pinged here. I will in a second when i linked to the integration. Help out instead and mark as duplicates

home-assistant[bot] commented 6 months ago

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

Code owner commands Code owners of `unifiprotect` 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 unifiprotect` 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)


unifiprotect documentation unifiprotect source (message by IssueLinks)

AngellusMortis commented 6 months ago

I was pinged. The user deleted their comment.

elupus commented 6 months ago

@dbhalla2280 this will be resolved on next service release

AngellusMortis commented 6 months ago

@home-assistant close

bdraco commented 6 months ago

https://community.home-assistant.io/t/psa-unifi-protect-3-x-backward-compatibility-issue-with-versions-below-2024-3-2/706984/3